How to properly override css-file


#1

I’d like to write my own css, but rather not litter my sheets with important-statements. I’ve read how I can override templates, but not how to do that to the css. Usually plugins look for a stylesheet in the template directory first. Please advise, thanks.


#2

@filip-van-hoeckel - You can do so by using a higher specificity in your theme’s stylesheet. Check this link for more on CSS Specificity -> http://coding.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/


#3

I understand that we can override like this, but this almost doubles the payload on the end-user. Downloading the default css, then the overrides. Best practice would involve checking the theme-folder first, nothing found > then use the default stylesheet. Worth considering, right?


#4

@filip-van-hoeckel - This is definitely on our roadmap and it’s just a matter of time before we get there!

Probably we would be giving an option to disable the default rtMedia styles so that you can enqueue them separately.


#5

It would be great :wink: thanks in advance


#6

#7