# Functions and Variables

**URL:** https://meta.discourse.org/t/functions-and-variables/86513
**Category:** Support
**Created:** [May 1, 2018, 6:48am UTC](https://meta.discourse.org/t/functions-and-variables/86513 "2018-05-01T06:48:48Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)
#### Post date: [May 2, 2018, 2:15am UTC](https://meta.discourse.org/t/functions-and-variables/86513/2 "2018-05-02T02:15:36Z")

</div>

> [@BlackKnob](#):
>
> Is it possible to get access to functions and variables from Discourse variables.scss?

Yes!

> [@BlackKnob](#):
>
> When I edit my theme, I can reference $primary, $secondary etc.
> 
> $primary-low or dark-light-choose() are not available though.

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:

> [@Use Discourse Core Variables in your Theme](https://meta.discourse.org/t/how-to-use-discourse-core-variables-in-your-theme/77551):
>
> Discourse is incredibly customizable! The goal of this topic is to show you how make use of all the amazing options that are available to you as a theme developer. You know… so that you don’t have to reinvent the wheel smileVariables? What variables? Variables cover a large number of things, from font sizes to colors to z-index values. You can use and override the vast majority of variables in your theme editor. Colors There are many colors available for you to use or override in your them…

> [@BlackKnob](#):
>
> Would adding @import “./variables”; to my theme be an overkill?

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

---

_[View the full topic](https://meta.discourse.org/t/functions-and-variables/86513)._
