Skip to content

Instantly share code, notes, and snippets.

@hrallo
Last active November 17, 2021 19:28
Show Gist options
  • Save hrallo/5ea63642e6b757b27cb2a6e562561c5a to your computer and use it in GitHub Desktop.
Save hrallo/5ea63642e6b757b27cb2a6e562561c5a to your computer and use it in GitHub Desktop.
$colors: (
black: $black,
white: $white,
"gray-50": $gray-50,
"gray-100": $gray-100,
"gray-200": $gray-200,
"gray-300": $gray-300,
"gray-400": $gray-400,
"gray-500": $gray-500,
"gray-600": $gray-600,
"gray-700": $gray-700,
"gray-800": $gray-800,
"gray-900": $gray-900,
"primary": $primary-color,
"primary-50": $primary-50,
"primary-100": $primary-100,
"primary-200": $primary-200,
"primary-300": $primary-300,
"primary-400": $primary-400,
"primary-500": $primary-500,
"primary-600": $primary-600,
"primary-700": $primary-700,
"primary-800": $primary-800,
"primary-900": $primary-900,
) !default;
$classes: "color" "background-color";
@mixin colorclasses($color_val, $color_hex) {
@each $current_class in $classes {
.#{$current_class}-#{$color_val} {
#{$current_class}: #{$color_hex};
}
}
}
@each $key, $value in $colors {
@include colorclasses($key, $value);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment