Rules Hub
Code Ruleset
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
Don't force `nowrap` on text that may grow
Avoid `white-space: nowrap` on message/label text that could be longer (other languages, future copy); let it wrap and solve overflow another way (e.g. `flex-shrink: 0` on siblings).
Bad example
| 1 | .toast { white-space: nowrap; } |
Explanation (EN)
Preventing all wrapping can clip text or force horizontal overflow when content grows.
Objašnjenje (HR)
Good example
| 1 | .toast { /* allow wrapping */ } |
| 2 | .toast .icon { flex-shrink: 0; } |
Explanation (EN)
Objašnjenje (HR)
Notes (EN)
For user-facing text that can grow through content or localization, test wrapping in constrained layouts and adjust adjacent flex items as needed.
Exceptions / Tradeoffs (EN)
An intentional one-line control may use truncation with accessible full text; do not remove nowrap without checking its layout contract.