Use theme variables in a theme component


(Alex Armstrong) #1

Is there a way to use theme variables (e.g., $primary or $love) in a theme component?


(Sam Saffron) #2

Should work fine in css


(Alex Armstrong) #3

Ah. I was asking a more basic question. The theme variables are in a Sass file, right? How would I use them from a theme (or theme component) when I’m just adding CSS?


(Sam Saffron) #4

They are just there, implicitly, using magic

Read through the source of the material design theme


How to use Discourse core variables in your theme
(Alex Armstrong) #5

Thanks, I think I got it. I was able to use them if I dropped a variable in the CSS field in the theme UI, but not in the way I’m including them (via <link rel="stylesheet" href="…">). I’ll look into restructuring my theme so that it plays well with the new theme architecture.