Functions and Variables


Is it possible to get access to functions and variables from Discourse variables.scss?

When I edit my theme, I can reference $primary, $secondary etc.
$primary-low or dark-light-choose() are not available though.

Would adding @import "./variables"; to my theme be an overkill?

(Joe) #2


The short answer is because $primary, $secondary etc are injected in by Discourse while the more complex variables are not.

And so, you’re correct, you’d have to import them first.

I use

@import "common/foundation/variables"

The long answer is here:

No, it’s not an overkill because they will not be a part of the compiled CSS sheet sent to the client.