fix(range): allow overflow on range bar container (#26751)

This commit is contained in:
Sean Perkins
2023-02-13 17:06:42 -05:00
committed by GitHub
parent 180ee63ff7
commit edf696cac9
4 changed files with 15 additions and 8 deletions

View File

@ -40,14 +40,16 @@
} }
.range-bar-active { .range-bar-active {
@include border-radius(0);
@include margin(null, calc(-1 * $range-ios-tick-width * 0.5), null, calc(-1 * $range-ios-tick-width * 0.5));
bottom: 0; bottom: 0;
width: auto; width: auto;
background: var(--bar-background-active); background: var(--bar-background-active);
&.has-ticks {
@include border-radius(0);
@include margin(null, calc(-1 * $range-ios-tick-width * 0.5), null, calc(-1 * $range-ios-tick-width * 0.5));
}
} }
.range-tick { .range-tick {

View File

@ -107,8 +107,6 @@
width: 100%; width: 100%;
height: var(--bar-height); height: var(--bar-height);
overflow: hidden;
} }
.range-bar { .range-bar {
@ -201,7 +199,6 @@
} }
::slotted([slot="label"]) { ::slotted([slot="label"]) {
/** /**
* Label text should not extend * Label text should not extend
* beyond the bounds of the range. * beyond the bounds of the range.
@ -226,7 +223,6 @@
overflow: hidden; overflow: hidden;
} }
/** /**
* If no label text is placed into the slot * If no label text is placed into the slot
* then the element should be hidden otherwise * then the element should be hidden otherwise

View File

@ -763,7 +763,16 @@ Developers can dismiss this warning by removing their usage of the "legacy" prop
<div class="range-bar-container"> <div class="range-bar-container">
<div class="range-bar" role="presentation" part="bar" /> <div class="range-bar" role="presentation" part="bar" />
<div class="range-bar range-bar-active" role="presentation" style={barStyle} part="bar-active" /> <div
class={{
'range-bar': true,
'range-bar-active': true,
'has-ticks': ticks.length > 0,
}}
role="presentation"
style={barStyle}
part="bar-active"
/>
</div> </div>
{renderKnob(rtl, { {renderKnob(rtl, {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB