Skip to content

Instantly share code, notes, and snippets.

@spazione
Created March 9, 2022 15:20
Show Gist options
  • Save spazione/cb2269f1e80d9c8adfa7d964e500c3f6 to your computer and use it in GitHub Desktop.
Save spazione/cb2269f1e80d9c8adfa7d964e500c3f6 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
$colorsmap: (
1: a,
2: b,
3: c
);
.colors {
@each $key, $value in $colorsmap {
--#{$key}: --#{$value};
}
}
@mixin load-colors($component, $themes...) {
@each $theme in $themes {
#{$component}: #{$theme};
}
}
.scope {
$component: "card-potatos";
.themes {
@include load-colors($component, dark, light);
}
}
.colors {
--1: --a;
--2: --b;
--3: --c;
}
.scope .themes {
card-potatos: dark;
card-potatos: light;
}
{
"sass": {
"compiler": "dart-sass/1.32.12",
"extensions": {},
"syntax": "SCSS",
"outputStyle": "expanded"
},
"autoprefixer": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment