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
cssflexboxlayoutpositioning
Prefer flex alignment utilities over absolute-positioning hacks
In a flex layout, use alignment classes/utilities (align-right) instead of position:absolute hacks to place children.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codecss
| 1 | .showMoreBtn { |
| 2 | position: absolute; |
| 3 | right: 0; |
| 4 | bottom: 0; |
| 5 | } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codehtml
| 1 | <div class="align-right"> |
| 2 | <button class="showMoreBtn">Show more</button> |
| 3 | </div> |
Explanation (EN)
Objašnjenje (HR)