Skip to content

Instantly share code, notes, and snippets.

@believer
Created September 28, 2022 08:17
Show Gist options
  • Save believer/113731ab1f66b9e28c6b402f9cfbda4d to your computer and use it in GitHub Desktop.
Save believer/113731ab1f66b9e28c6b402f9cfbda4d to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// Defined in asset library
$color-data-blue: #5d8aff;
$color-data-purple: #a858ff;
// Map colors
$colors: (
blue: $color-data-blue,
purple: $color-data-purple,
// and so on...
);
// Generate class names
@each $name, $color in $colors {
.data-#{$name} {
background-color: $color;
}
}
.data-blue {
background-color: #5d8aff;
}
.data-purple {
background-color: #a858ff;
}
{
"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