Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(range): use correct color of thumb for disabled state #1070

Merged
merged 7 commits into from
Dec 13, 2023
7 changes: 3 additions & 4 deletions projects/angular/src/forms/styles/_containers.clarity.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,11 @@
);
}

input[type='range']::-webkit-slider-thumb,
input[type='range']::-moz-range-thumb {
input[type='range']::-webkit-slider-thumb {
@include mixins.css-var(
background-color,
clr-forms-forms-range-progress-disabled-color,
forms-variables.$clr-forms-range-progress-fill-color-disabled,
clr-forms-border-disabled-color,
forms-variables.$clr-forms-border-disabled-color,
variables.$clr-use-custom-properties
);
}
Expand Down
6 changes: 6 additions & 0 deletions projects/ui/src/shim.cds-core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,12 @@ $metropolis-font-family: Metropolis, 'Avenir Next', 'Helvetica Neue', Arial, san
--clr-forms-range-thumb-margin-top: 7px; // TODO: ATM - get rid of this
--clr-forms-range-progress-fill-height: 3px; // TODO: ATM - get rid of this

// Fix for disabled range thumb color on CDS theme (when using ngModel)
.clr-form-control-disabled input[type='range']::-webkit-slider-thumb,
.clr-form-control-disabled input[type='range']::-moz-range-thumb {
background-color: var(--clr-forms-range-progress-fill-color-disabled);
}

// Password
// TODO: ATM Make sure this is what we need,
// in spec it is #{tokens.$cds-alias-interaction-color}, which is gray, hence it's put as fallback here
Expand Down