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 ruleP2stack specificStack: css
csstypographyspacing
Adjust line-height rather than padding for text vertical rhythm
To fix vertical spacing of text, tune line-height instead of adding padding, which keeps the box model tied to the type.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codescss
| 1 | .stat { |
| 2 | font-size: rem-calc(40); |
| 3 | padding-top: rem-calc(6); |
| 4 | } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codescss
| 1 | .stat { |
| 2 | font-size: rem-calc(40); |
| 3 | line-height: 1.1; |
| 4 | } |
Explanation (EN)
Objašnjenje (HR)