Rules Hub
Code Ruleset
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
Omit CSS properties that already match their defaults
Omit CSS defaults only after verifying that the declaration is not an intentional cascade reset and its removal preserves layout.
Bad example
| 1 | .row { display: flex; flex-direction: row; } |
Explanation (EN)
A verified default can be omitted, but resetting a competing declaration is observable behavior.
Objašnjenje (HR)
Good example
| 1 | .row { display: flex; } |
Explanation (EN)
The verified initial direction remains unchanged.
Objašnjenje (HR)
Notes (EN)
Remove an explicit CSS default only when no lower-priority selector, inherited behavior, breakpoint or component variant needs that declaration to reset another value.
Exceptions / Tradeoffs (EN)
Keep intentional cascade resets. width:auto and width:100% are not generally interchangeable, and form controls may have intrinsic widths.