Skip to content
23 changes: 13 additions & 10 deletions core/src/components/range/range.ionic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,30 +75,33 @@
@include margin(null, null, calc(globals.$ion-space-200 + globals.$ion-font-size-300), null);
}

.range-bar.has-ticks {
@include border-radius(0);
}

.range-bar.range-bar-active.has-ticks {
@include margin(null, calc(-1 * globals.$ion-scale-100 * 0.5), null, calc(-1 * globals.$ion-scale-100 * 0.5));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this style needed? I had to zoom in a lot to see it being applied and it doesn't seem like it really does much.

}

.range-bar.range-bar-active {
bottom: 0;

width: auto;

background: var(--bar-background-active);

&.has-ticks {
@include border-radius(0);
@include margin(null, calc(-1 * globals.$ion-scale-100 * 0.5), null, calc(-1 * globals.$ion-scale-100 * 0.5));
}
}

.range-tick {
@include margin-horizontal(calc(globals.$ion-scale-100 * -0.5), null);
@include border-radius(globals.$ion-border-radius-0);
@include border-radius(globals.$ion-border-radius-400);

position: absolute;
top: calc((var(--height) * 0.5) - (globals.$ion-scale-300 * 0.5));
top: calc((var(--height) * 0.5) - (globals.$ion-scale-400 * 0.5));

width: globals.$ion-scale-100;
height: globals.$ion-scale-300;
width: globals.$ion-scale-050;
height: globals.$ion-scale-400;

background: globals.$ion-primitives-neutral-100;
background: var(--bar-background);
pointer-events: none;
}

Expand Down
9 changes: 8 additions & 1 deletion core/src/components/range/range.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,14 @@ export class Range implements ComponentInterface {
))}

<div class="range-bar-container">
<div class="range-bar" role="presentation" part="bar" />
<div
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these changes being applied? These are already in next. You might need to sync with next to get them.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The permalink you attached refers to the bar-active part of the range bar. What I changed was the bar part that was missing this logic.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I completely missed that. It might be better to have a class on host then. But we can make that decision during ionic modular so this PR can move faster.

class={{
'range-bar': true,
'has-ticks': ticks.length > 0,
}}
role="presentation"
part="bar"
/>
<div
class={{
'range-bar': true,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading