Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions core/src/components/range/range.ionic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,30 +75,35 @@
@include margin(null, null, calc(globals.$ion-space-200 + globals.$ion-font-size-300), null);
}

.range-bar.range-bar-active {
bottom: 0;
.range-bar {
&.has-ticks {
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.

Please revert this to be .range-bar.has-ticks. Nested styles like these can get hard to read.

@include border-radius(0);
}

width: auto;
&.range-bar-active {
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.

Please revert this to be .range-bar.range-bar-active. Nested styles like these can get hard to read.

bottom: 0;

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

&.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));
background: var(--bar-background-active);

&.has-ticks {
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.

Please revert this to be .range-bar-active.has-ticks. Nested styles like these can get hard to read.

@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.

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