Skip to content

v3.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 02 May 16:10
· 5 commits to main since this release

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.