Skip to content

Commit

Permalink
decouple clr-auto function to let user override contrast values
Browse files Browse the repository at this point in the history
  • Loading branch information
ashfahan committed Mar 16, 2021
1 parent 82b8241 commit c297c4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/settings/theme/_color.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ $theme-colors: (
$theme-colors: map-merge($colors, $theme-colors);
}

$white-contrast: $white !default;
$dark-contrast: $gray-900 !default;

$valid-classname: if(map-get($theme-colors, "valid"), "valid", false) !default;
$error-classname: if(map-get($theme-colors, "error"), "error", false) !default;

Expand Down
2 changes: 1 addition & 1 deletion src/tools/functions/_clr-auto.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// Return:
// {Color} Returns $dark for light color and $light for dark color
//
@function clr-auto($color, $light: $white, $dark: $gray-900) {
@function clr-auto($color, $light: $white-contrast, $dark: $dark-contrast) {
$lightContrast: clr-contrast($color, $light);
$darkContrast: clr-contrast($color, $dark);

Expand Down

0 comments on commit c297c4c

Please sign in to comment.