# Sass variables are not being read in code

**URL:** <https://meta.discourse.org/t/sass-variables-are-not-being-read-in-code/256588>\
**Category:** Development\
**Created:** [February 28, 2023, 11:52pm UTC](https://meta.discourse.org/t/sass-variables-are-not-being-read-in-code/256588 "2023-02-28T23:52:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [March 2, 2023, 10:32pm UTC](https://meta.discourse.org/t/sass-variables-are-not-being-read-in-code/256588/2 "2023-03-02T22:32:30Z")

</div>

I encountered the same issue a few weeks ago and concluded that the `if` SASS condition wasn’t working as I thought. I’d be very happy to know if such a thing is possible though:

Having “if this site\_setting == value then” in a SASS file.

I’m just putting this here in case it would be of any usefulness:

> **[Sass: @if and @else](https://sass-lang.com/documentation/at-rules/control/if/)**
>
> Syntactically Awesome Style Sheets

---

_[View the full topic](https://meta.discourse.org/t/sass-variables-are-not-being-read-in-code/256588)._
