-
Notifications
You must be signed in to change notification settings - Fork 66
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
My !important styles will not override cleanslate's #30
Comments
Could you paste an example of a rule in the final CSS that gets overridden? If you are including Cleanslate first, and your rules after, then something like |
Is it the order the style sheet loads or the order/hierarchy of the css classes used? Because I have no idea what order webpack includes stuff (I can look into forcing it, maybe its alphabetically?) If its the order of the classes though it should work. To me it wouldn't make sense that css classes would trump other different classes used throughout HTML in the proper order just because of the order they were included on the page.
someclass I would think should always override cleanslate classes in this case
cleanslate should always override in this case
otherstylesheet should only override classes or standard elements that are defined in both sheets. completely different classes defined in otherstylesheet should not take precedence just because of the order included here, it should then be based on the order the classes are used in the DOM. (obviously not the fault of cleanslate if this is not actual functionallity of the browser but this is how I imagine it should work) This is what my widget looks like in Chrome Dev tools: |
The Cleanslate stylesheet uses two levels of selector:
If it helps, you could have your rules include the prefix |
It doesn't seem like my styles are properly overriding the cleanslate rules even though I add !important to everything myself as well. This is within a React/Webpack built script where my styles are in LESS files and !important is added programmatically. I do not believe this is relevant to why this is happening as the outputted CSS looks to be correct.
My widget looks like this:
The styles under myWidgetClass are all set with !important but cleanslate is still overriding them.
Is this the correct way to use this?
The text was updated successfully, but these errors were encountered: