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: