-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Can't override external CSS without !important #331
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
Comments
I'll change the assets to go after external. |
Yeah, that seems like it would be the right default behaviour. |
And if the user really needs to customize it, then they can override the index |
Is that possible right now? I tried but it looks like external and local css are imported as one chunk without an option to order them: Line 438 in 7361db5
|
No, it's not possible to reorder right now, I want to change the generate_html methods to be separate from the resources collection and give raw resources list to interpolate_index instead. |
Not really a bug, just something I noticed that we should be aware of.
In the new
assets
directory approach to including CSS, external stylesheets always appear beneath local stylesheets.There doesn't seem to be a way to switch this (at least that I'm aware of), so a user can't override CSS from external libraries without !important since external scripts will always be imported last and thus take precedence. I think this is a very common use case (e.g. import bootstrap, then add your own CSS to customize a small part of bootstrap) and users shouldn't have to manually add !important to all their stylesheets or change the specificity of selectors to get it to work.
The text was updated successfully, but these errors were encountered: