Utiliser le schéma de couleurs couleur si schéma sombre, sinon utiliser ma couleur dans le thème

I think this is what you’re looking for:

So in color_definitions.scss you can do:

$my-theme-color: dark-light-choose($primary, red);

:root {
  --my-theme-color: #{$my-theme-color};
}

and then you’d use the new dark/light changing custom property in your theme:

body {
  color: var(--my-theme-color);
}
5 « J'aime »