Skip to content

Commit

Permalink
fix: invalid text color for inputs (#3539)
Browse files Browse the repository at this point in the history
* fix: we need to correctly set the variant at the very beginning

* Update _form-components.scss
  • Loading branch information
mfranzke authored Dec 2, 2024
1 parent d18df34 commit c168430
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/components/src/styles/_form-components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ $check-border-size: min(#{variables.$db-border-height-2xs}, 2px);
@mixin get-validity-color($selector, $key: "valid") {
$variant: "successful";

@if ($key != "valid") {
$variant: "critical";
}

@include get-validity-message($key);

#{$selector},
Expand All @@ -173,10 +177,6 @@ $check-border-size: min(#{variables.$db-border-height-2xs}, 2px);
caret-color: var(--db-#{$variant}-on-bg-basic-emphasis-100-default);
}

@if ($key != "valid") {
$variant: "critical";
}

@if ($selector != textarea) {
@extend %db-#{$variant}-variables;
/* stylelint-disable-next-line at-rule-empty-line-before */
Expand Down

0 comments on commit c168430

Please sign in to comment.