Skip to content

Commit

Permalink
style(Slider): fix issues with hidden input variant misalignment (#16250
Browse files Browse the repository at this point in the history
)

Co-authored-by: Taylor Jones <[email protected]>
  • Loading branch information
tw15egan and tay1orjones authored May 6, 2024
1 parent 92cd840 commit f3d8bf4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/components/Slider/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,7 @@ class Slider extends PureComponent<SliderProps> {
hasTooltip={hideTextInput}
className={lowerThumbWrapperClasses}
label={`${value}`}
align={twoHandles ? 'top-right' : 'top'}
align="top"
{...lowerThumbWrapperProps}>
<div
className={lowerThumbClasses}
Expand Down Expand Up @@ -1552,7 +1552,7 @@ class Slider extends PureComponent<SliderProps> {
hasTooltip={hideTextInput}
className={upperThumbWrapperClasses}
label={`${valueUpper}`}
align="top-left"
align="top"
{...upperThumbWrapperProps}>
<div
className={upperThumbClasses}
Expand Down
7 changes: 5 additions & 2 deletions packages/styles/scss/components/slider/_slider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
}

> .#{$prefix}--popover > .#{$prefix}--popover-caret {
inset-inline-end: 0;
inset-inline-start: revert;
transform: translate(
50%,
Expand Down Expand Up @@ -159,7 +158,6 @@
}

> .#{$prefix}--popover > .#{$prefix}--popover-caret {
inset-inline-start: 0;
transform: translate(
-50%,
calc(-1 * custom-property.get-var('popover-offset', 0rem))
Expand Down Expand Up @@ -477,6 +475,11 @@
}
}

// With hidden input
.#{$prefix}--popover-container.#{$prefix}--slider__thumb-wrapper {
position: absolute;
}

// Windows HCM fix
/* stylelint-disable */
.#{$prefix}--slider__thumb {
Expand Down

0 comments on commit f3d8bf4

Please sign in to comment.