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
csstransitionperformance
Transition specific properties, not `all`
`transition: all` forces the browser to watch every property for changes; list the exact properties you animate (and pull duration/easing into variables).
PR: profico-mining-2026-06Created: Jul 26, 2026
Bad example
Old codescss
| 1 | .btn { transition: all 0.3s ease; } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codescss
| 1 | .btn { transition: background-color $duration cubic-bezier(.4,0,.2,1); } |
Explanation (EN)
Objašnjenje (HR)