emeric_owczarz
emeric_owczarz
KPCKevin Powell - Community
Created by emeric_owczarz on 9/8/2023 in #front-end
Dark mode / dark theme implementation in SASS
Thank you all for your replies, but that's quite not what i asked initially. Basically i want to link this to a mixin, a function or whatever :
$light: (
$background-color: lightgrey,
$text-color: blue,
);
$dark: (
$background-color: black,
$text-color: red,
);
$light: (
$background-color: lightgrey,
$text-color: blue,
);
$dark: (
$background-color: black,
$text-color: red,
);
So when i call my variables in my stylesheets, i can get one value for the color, like this
.container{
background-color:$background-color;
color:$color;
}
.container{
background-color:$background-color;
color:$color;
}
No matter if a call @mixin background-coloror background-color:myColorName() Important thing is i only call ONE variable in the css
18 replies
KPCKevin Powell - Community
Created by emeric_owczarz on 9/8/2023 in #front-end
Dark mode / dark theme implementation in SASS
i came across this solution and i think it's a robust one, as you can declare almost any property in a single line. I tested it out using system preferences, it seems OK. I will implement a toggle using JS too 👍
18 replies