Skip to content

Commit 832668d

Browse files
joyzhongcopybara-github
authored andcommitted
fix(slider): Fix bug where value indicator container took space and could be hovered over / clicked when hidden.
PiperOrigin-RevId: 345699434
1 parent 1c156d6 commit 832668d

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

packages/mdc-slider/_slider.scss

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ $_track-inactive-height: 4px;
319319
left: 50%;
320320
position: absolute;
321321
transform: translateX(-50%);
322+
visibility: hidden;
322323
}
323324
}
324325

@@ -355,13 +356,21 @@ $_track-inactive-height: 4px;
355356
}
356357
}
357358

358-
.mdc-slider__thumb--with-indicator .mdc-slider__value-indicator {
359-
@include feature-targeting.targets($feat-animation) {
360-
transition: animation.enter(transform, 100ms);
359+
.mdc-slider__thumb--with-indicator {
360+
.mdc-slider__value-indicator-container {
361+
@include feature-targeting.targets($feat-structure) {
362+
visibility: visible;
363+
}
361364
}
362365

363-
@include feature-targeting.targets($feat-structure) {
364-
transform: scale(1);
366+
.mdc-slider__value-indicator {
367+
@include feature-targeting.targets($feat-animation) {
368+
transition: animation.enter(transform, 100ms);
369+
}
370+
371+
@include feature-targeting.targets($feat-structure) {
372+
transform: scale(1);
373+
}
365374
}
366375
}
367376

0 commit comments

Comments
 (0)