Rules Hub
Code Ruleset
← 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
cssscssredundancyclean-code
Do not add a redundant hover rule when cursor: pointer already implies it
Remove a hover cursor declaration that merely repeats the existing effective cursor; preserve other hover affordances and intentional overrides.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codescss
| 1 | .row { |
| 2 | cursor: pointer; |
| 3 | &:hover { cursor: pointer; } |
| 4 | } |
Explanation (EN)
Repeating the unchanged cursor in a hover block adds no visual behavior.
Objašnjenje (HR)
Good example
New codescss
| 1 | .row { |
| 2 | cursor: pointer; |
| 3 | } |
Explanation (EN)
Objašnjenje (HR)
Notes (EN)
Remove a hover cursor declaration only when the same cursor already wins for that element in the hover cascade.
Exceptions / Tradeoffs (EN)
This rule concerns duplicated cursor values, not removing color/underline/focus affordances. A hover override may reset a conflicting selector.