Rules Hub
Code Ruleset
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
Transition specific properties, not `all`
List intended transition properties so unrelated later style changes do not animate accidentally.
Bad example
| 1 | .btn { transition: all 0.3s ease; } |
Explanation (EN)
all can animate an unrelated property added later and create unexpected layout motion.
Objašnjenje (HR)
Good example
| 1 | .btn { transition: background-color 0.3s ease; } |
Explanation (EN)
Only the intended color change receives this transition.
Objašnjenje (HR)
Notes (EN)
For a component transition, list the properties intended to animate and verify hover/focus/disabled states and reduced-motion behavior.
Exceptions / Tradeoffs (EN)
all can be deliberate in a small controlled effect; performance cost depends on the properties that actually change, not a claim that every property is continuously polled.