CSS cascade / origin / layer / specificity
Separate CSS origin, layer, specificity and order
Do not decide a winner from specificity alone. Review origin, layer, source order and important separately with synthetic rules and no external stylesheet fetch.
Five review axes
Separate origin and importance, layer, specificity and source order to avoid adding unnecessary important declarations.
origin → layer → specificity → source order
!important is a separate boundary from ordinary rules
| Axis | Review |
|---|
| origin | Do not mix author, user and UA origin. |
| layer | Separate layer order from unlayered rules. |
| specificity | Use it as a comparison within the same conditions. |
| source order | Check later order when other conditions match. |
| important | Review origin and layer before adding it. |
Safe correction order
- Record origin and importance of the winning rule.
- Review layer and unlayered relationships.
- Compare specificity only as needed.
- Review source order last and approve the correction note.
This page does not load an external stylesheet. Apply real CSS changes only through the existing review process.
Six synthetic cases
| case | result |
|---|
origin-author | Author origin |
layer-order | Layer order |
specificity | Specificity |
source-order | Source order |
important-override | Important boundary |
unsupported-external-css | Reject |