-
Notifications
You must be signed in to change notification settings - Fork 228
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
Wrap css in layer #85
Comments
@aspirisen I believe the overriding you are seeing is to be expected. According to the Description section of the MDN page for
Note: Bolding of text added by me. Therefore, the reset CSS code is operating as expected. That is, the reset CSS is overriding the code within the Further down the MDN page, it discussed the third way of declaring a cascade layer - with no name - creating an anonymous layer. Such as...
Therefore, if one is using |
Yes, but in my opinion this is not expected from this library. This library strives to lowest specificity for easier overrides. If you are using layers reset doesn't help.
I am using this library as npm package, and import it at top at the first entry of my application. Wrapping in such conditions will be not ideal. I suggest to wrap in layer here, in the source code. |
OK. You should make that change suggestion to the repository's author, or perhaps make the change yourself and submit it as a PR. You could also consider using the |
I believe that Regardless, we can consider adding another entry point which would wrap the reset in a named layer like so: |
The solution with import looks good, however doesn't work out of the box in nextjs vercel/next.js#55763 Probably another entry is the best solution for a while, until browser support of layers will increase |
The reset styles are overriding all styles under layers
Example:
https://codepen.io/aspirisen/pen/oNOwEqv
The text was updated successfully, but these errors were encountered: