Skip to content

Commit

Permalink
changes from PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
leagrdv committed Dec 17, 2024
1 parent f2de445 commit edeea51
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
37 changes: 20 additions & 17 deletions packages/styles/src/components/form-select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

@use './../mixins/utilities';
@use './../functions/forms' as forms-fx;
@use './../mixins/forms' as forms-mx;
@use './../functions/tokens';
@use './../tokens/components';
@use './../tokens/elements';
Expand Down Expand Up @@ -103,12 +104,16 @@ tokens.$default-map: components.$post-select;
}
}

@include utilities.high-contrast-mode-dark() {
background-image: forms-fx.select-arrow-icon('enabled'), forms-fx.valid-icon('#e0e0e0') !important;
}
&,
&:hover:not([multiple]),
&:focus {
@include utilities.high-contrast-mode-dark() {
background-image: forms-fx.select-arrow-icon('enabled'), forms-fx.valid-icon('#e0e0e0');
}

@include utilities.high-contrast-mode-light() {
background-image: forms-fx.select-arrow-icon('enabled'), forms-fx.valid-icon('#333333') !important;
@include utilities.high-contrast-mode-light() {
background-image: forms-fx.select-arrow-icon('enabled'), forms-fx.valid-icon('#333333');
}
}
}

Expand All @@ -125,12 +130,16 @@ tokens.$default-map: components.$post-select;
}
}

@include utilities.high-contrast-mode-dark() {
background-image: forms-fx.select-arrow-icon('enabled'), forms-fx.invalid-icon('#e0e0e0') !important;
}
&,
&:hover:not([multiple]),
&:focus {
@include utilities.high-contrast-mode-dark() {
background-image: forms-fx.select-arrow-icon('enabled'), forms-fx.invalid-icon('#e0e0e0');
}

@include utilities.high-contrast-mode-light() {
background-image: forms-fx.select-arrow-icon('enabled'), forms-fx.invalid-icon('#333333') !important;
@include utilities.high-contrast-mode-light() {
background-image: forms-fx.select-arrow-icon('enabled'), forms-fx.invalid-icon('#333333');
}
}
}

Expand All @@ -143,13 +152,7 @@ tokens.$default-map: components.$post-select;
background-position: center right tokens.get('select-validation-icon-position-inline-end');
}

&.is-valid:not(:disabled) {
background-image: forms.$valid-icon;
}

&.is-invalid:not(:disabled) {
background-image: forms.$invalid-icon;
}
@include forms-mx.validation-icons();
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/styles/src/mixins/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}
}

// Used on form-input and form-textarea to set the correct colored validation icon
// Used on form elements to set the correct colored validation icon
@mixin validation-icons() {
&.is-valid:not(:disabled) {
background-image: forms.$valid-icon;
Expand Down

0 comments on commit edeea51

Please sign in to comment.