DEV Community

Cover image for WordPress Question
Saharan-sub
Saharan-sub

Posted on

WordPress Question

I am wondering when it's appropriate to appearance Customize option over the theme editor ?

TIA

Top comments (4)

Collapse
 
jacklowrie profile image
Jack Lowrie • Edited

I'm not sure if there's a definitive answer for that. If you're asking about adding CSS via the customizer vs doing it in a theme's style.css, a guideline might be "if it's more than one rule, move it to the theme".

Otherwise, it's more likely about who you want to have control - adding a color option for buttons to the customizer makes it so a non-developer can change the color of buttons across the site. Without that, a non-developer would need help making that change in the theme files.

Collapse
 
godwin_france profile image
Saharan-sub • Edited

But are there any level of prioritization given to where the CSS rule is placed, e.g
at the customized vs at the theme ?

Collapse
 
jacklowrie profile image
Jack Lowrie

Yes - Customizer CSS is loaded in the header, inline, and after the theme's style.css. This means rules in the customizer with equal specificity will override rules from your theme's stylesheet.

Thread Thread
 
godwin_france profile image
Saharan-sub

ok, so that means that Customizer CSS has a higher priority of the theme's stylesheet.

Thanks