Skip to content

Commit

Permalink
chore(colorslider): alias disabled color
Browse files Browse the repository at this point in the history
  • Loading branch information
cdransf committed Dec 19, 2024
1 parent 6103f72 commit 46c0ce3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/colorslider/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
.spectrum-ColorSlider {
/* Size and Spacing */
--spectrum-color-slider-handle-margin-block: var(--spectrum-component-top-to-text-75);
--spectrum-color-slider-control-track-width: var(--spectrum-color-control-track-width);

/* @todo Refactor with --spectrum-color-slider-border-color once gray rgb token is no longer necessary to workaround nested rgb color token value using rgba(). */
--spectrum-color-slider-border-color-rgba: rgba(var(--spectrum-gray-1000-rgb), var(--spectrum-color-slider-border-opacity));
Expand All @@ -25,6 +26,8 @@

/* Settings for nested Color handle */
--mod-colorhandle-hitarea-border-radius: var(--mod-color-slider-handle-hitarea-border-radius, 0px);

--spectrum-colorslider-fill-color-disabled: var(--spectrum-disabled-background-color);
}

.spectrum-ColorSlider {
Expand All @@ -33,7 +36,7 @@

min-inline-size: var(--mod-color-slider-minimum-length, var(--spectrum-color-slider-minimum-length));
inline-size: var(--mod-color-slider-length, var(--spectrum-color-slider-length));
block-size: var(--mod-color-slider-control-track-width, var(--spectrum-color-control-track-width));
block-size: var(--mod-color-slider-control-track-width, var(--spectrum-color-slider-control-track-width));

/* Otherwise we randomly drag a file icon */
user-select: none;
Expand Down Expand Up @@ -87,7 +90,7 @@

.spectrum-ColorSlider.is-disabled & {
--spectrum-color-slider-border-color-local: var(--highcontrast-color-slider-border-color-disabled, var(--mod-color-slider-border-color-disabled, var(--spectrum-disabled-background-color)));
background: var(--highcontrast-color-slider-background-color-disabled, var(--mod-color-slider-background-color-disabled, var(--spectrum-disabled-background-color)));
background: var(--highcontrast-color-slider-background-color-disabled, var(--mod-color-slider-background-color-disabled, var(--spectrum-colorslider-fill-color-disabled)));
}
}

Expand Down

0 comments on commit 46c0ce3

Please sign in to comment.