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 ruleP2universalStack: css
cssdryarchitecturestylesheets
Put cross-page CSS in a shared stylesheet, not one page's module
When rules are reused by several sibling pages, extract them into a common stylesheet rather than importing one page's styles into another.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codetypescript
| 1 | // MainPage.tsx |
| 2 | import * as style from 'frontpage/component/styles/comicsPage.scss'; |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | // shared styles for all frontpage-type pages |
| 2 | import * as style from 'frontpage/component/styles/commonsPage.scss'; |
Explanation (EN)
Objašnjenje (HR)