v3.0.0
New Features
-
Add
@layer base
to lower the precedence for all rules @1aron 0b9fe9a<v3.0.0
*, ::before, ::after { box-sizing: border-box; } ...
latest
@layer base { *, ::before, ::after { box-sizing: border-box; } ... }
Any styles not in a layer are gathered together and placed into a single anonymous layer that comes after all the declared layers, named and anonymous. This means that any styles declared outside of a layer will override styles declared in a layer, regardless of specificity.
Therefore, we can use
@layer base
to make the preset styles have low precedence in all anonymous layer rules to prevent custom styles from being overwritten.