premasagar / cleanslate

An extreme CSS reset stylesheet, for aggressively resetting the styling of an element and its children. Composed exclusively of CSS !important rules.
http://cleanslatecss.com
MIT License
612 stars 66 forks source link

css framework, after sanitizing. how to? #34

Open stefanosky opened 6 years ago

stefanosky commented 6 years ago

hi, i'm using your cleanslatecss, very nice! I want to add a css framework to a widget (http://beauter.outboxcraft.com ) , there is a solution? the frameworks don't have !important on each rules. and some of them, override the whole page, but not the widget thanks. Stefano

ddelrio1986 commented 6 years ago

@stefanosky I had to do this once. I was using GulpJS at the time to build my CSS so I just ran the frameworks through some tools that added !important to the CSS. It was slow and a pain when I wanted to change the framework's styles but it worked.

premasagar commented 6 years ago

Hi. Thanks for the comment. Yes, it is a pain if you want to add a library stylesheet on top of Cleanslate. Really the only solution is to post-process the stylesheet by something that adds !important to every rule, as @ddelrio1986 says. Does anyone have a suggestion for such a function in Gulp/Webpack, etc?

ddelrio1986 commented 6 years ago

@premasagar I use to use gulp-css-vip to add !important to everything.