The discussion revolves around SCSS color property variable issues. OP Lilly encounters errors when using variables in a settings.yaml file with SCSS color functions, specifically rgba().
RGJ provides an example where declaring variables directly in the SCSS file works, but Lilly notes that this solution does not apply when variables are defined in a separate settings.yml file.
Canapin explains that the issue stems from SCSS treating theme variables as strings, making them incompatible with color functions. This is a known issue with SCSS, not specific to Discourse.
Don provides a solution by creating variables from the theme settings, as demonstrated in a GitHub example. This solution is appreciated by Lilly. Canapin humorously notes that Don often finds workarounds for seemingly impossible problems.
Yes but as soon as I put the variables into a settings.yml like this, it does not work for me. I get an error saying $color is not a color even though I am not using a $color variable here. So I assume it may be related to an interpolation thing that I don’t understand.
In my mind, it seems like this is about how the CSS is compiled. the variables work when declared at the CSS run time, but not dynamically via separate settings.yml file.
Short answer: Themes and CSS variables are considered strings and, while you can use them in attributes such as color, background, border and so on, they can’t be used in SCSS color functions.