They should be that way already. It could be dependent on the theme you are using but I haven’t seen one yet that didn’t work that way.
If you’re having to use !important
, then it is probably not the order of the style sheets, but has more to do with CSS Specificity and the CSS selector you are using. If two CSS selectors apply to the same element, the one with higher specificity wins.
The four categories of Specificity hierarchy
-
Inline styles (Presence of style in document).
-
IDs (# of ID selectors).
-
Classes, attributes and pseudo-classes (# of class selectors).
-
Elements and pseudo-elements (# of Element (type) selectors).
As a general rule if you find your self-using !important
then you probably need to look at the selector you are using.
If you want more information on CSS Specificity check out this article in Smashing Magazine: