Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using @layer base in custom CSS causes it to be _prepended_ instead of _appended_ to layer. #166

Open
jorismak opened this issue Mar 23, 2022 · 1 comment

Comments

@jorismak
Copy link

Describe the bug
Using @layer base in custom CSS causes it to be prepended instead of appended to layer.

If I add code in @layer base for setting defaults for typography, like font-size for H1 tags, it's put at the start of the base layer, so all of Windi's preflight/reset/normalize css follows it, and overrides it.

To Reproduce

@layer base {
    h1 {
       font-size: 24px;
    }
}

This won't work, because a font-size: inherit is put after in the 'virtual' windi.css file.

Expected behavior
Custom css to be put after the base layers, so you can work from it, instead of having to put !important everywhere.
Or another way to import a .css / .scss file to set the typography rules for a project.

@AndrewBogdanovTSS
Copy link

Could you provide a repo with reproduction? I tried layer base just recently and it works fine for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants