Skip to content

Commit

Permalink
fix(slider): work around Spectrum CSS bug in variant="range" styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Westbrook committed Jun 11, 2021
1 parent 8d5a743 commit e5810a9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/slider/src/slider.css
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,22 @@ governing permissions and limitations under the License.
) !important;
}

/**
* Begin workaround for https://github.com/adobe/spectrum-css/issues/1205
*/

:host([dir='ltr'][variant='range']) .track,
:host([dir='rtl'][variant='range']) .track {
/* [dir=ltr] .spectrum-Slider--range .spectrum-Slider-track,
* [dir=rtl] .spectrum-Slider--range .spectrum-Slider-track */
margin: var(--spectrum-slider-range-track-reset);
margin-top: calc(var(--spectrum-slider-track-height) / -2);
}

/**
* End workaround for https://github.com/adobe/spectrum-css/issues/1205
*/

:host([dir='ltr']) .track:not(:first-of-type):not(:last-of-type) {
left: var(--spectrum-slider-track-segment-position);
}
Expand Down

0 comments on commit e5810a9

Please sign in to comment.