Skip to content

Commit

Permalink
feat: add color-variants for components (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmerget authored Nov 23, 2022
1 parent 025ea77 commit a1fc4a9
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions scss/color/_color-variants.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@use "color-placeholder" as *;

$color-variants: "neutral-0", "neutral-1", "neutral-3", "neutral-4", "neutral-5",
"neutral-6", "primary", "primary-light", "secondary", "secondary-light",
"critical", "critical-light", "success", "success-light", "warning",
"warning-light", "information", "information-light";

@mixin color-variants($ia) {
@each $variant in $color-variants {
&[data-color-variant="#{$variant}"] {
@extend %db-bg-#{$variant};
}
@if ($ia == true) {
&[data-color-variant="#{$variant}-ia"] {
@extend %db-bg-#{$variant}-ia;
}
}
}
}

%color-variants {
@include color-variants(false);
}
%color-variants-ia {
@include color-variants(true);
}

0 comments on commit a1fc4a9

Please sign in to comment.