Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
frontend ruleP2universalStack: css
csstruncationtextui
Use the full webkit line-clamp block for multiline ellipsis
To truncate text across multiple lines you need the complete -webkit-box clamp set, not just text-overflow: ellipsis.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codescss
| 1 | .reply { |
| 2 | overflow: hidden; |
| 3 | text-overflow: ellipsis; // does nothing for multiline |
| 4 | } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codescss
| 1 | .reply { |
| 2 | display: -webkit-box; |
| 3 | overflow: hidden; |
| 4 | text-overflow: ellipsis; |
| 5 | -webkit-box-orient: vertical; |
| 6 | -webkit-line-clamp: 2; |
| 7 | } |
Explanation (EN)
Objašnjenje (HR)