Gibt es eine Möglichkeit, @if in einer Theme-Komponente mit einer Variablen zu verwenden?

Runtime CSS variables like --my-variable can’t be consumed in SASS/SCSS build-time @if statements.

So I think you’d have to handle this entirely at build-time, sticking to SCSS variables only. Something like:

@if $my_boolean_setting_in_theme == "true" {
  ...
}
5 „Gefällt mir“