Program "Primary Color" Into Rows and Elements

Hello!

I was looking into this possibility and I’m hoping its not like hardcore code. How can I program the primary color to be used with rows and other elements? is it possible use a variable in CSS? I’m wondering if something like background: #variable; were #variable is replaced by a color each time should be enough but I’m not sure how or if this would work.

I hope you are able to solve mi issue! :smiley:

Hi,

You can’t have variables in CSS.

And I’m not sure I understand exactly what you want to do but you could have a look at inc/styles.php. We’re picking up the primary color in PHP and using it where it’s needed


$primary_color	= get_theme_mod('primary_color', $defaults['primary_color']);