Skip to content

fix(range): update tick styling and border radius#31080

Open
OS-giulianasilva wants to merge 9 commits intonextfrom
ROU-12467-ticks-styling
Open

fix(range): update tick styling and border radius#31080
OS-giulianasilva wants to merge 9 commits intonextfrom
ROU-12467-ticks-styling

Conversation

@OS-giulianasilva
Copy link
Copy Markdown
Contributor

@OS-giulianasilva OS-giulianasilva commented Apr 14, 2026

Issue number: resolves internal


What is the current behavior?

  • When the range has ticks="true", the active bar segment is forced to a 0 border radius, while the inactive segment remains rounded.
  • Tick height, width and border radius do not match Figma specifications.
  • The tick and bar backgrounds use different colors.

What is the new behavior?

  • Added the has-ticks class to the bar part of the range bar, replicating the behavior found in the bar-active part.
  • Updated the CSS to apply the same border radius for both bar and bar-active parts.
  • Updated the tick's width, height and border radius.
  • Changed the background color of .range-tick from a hardcoded neutral value to a CSS variable --bar-background, ensuring the ticks and bar share the same color.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Before:

image

After:

image

OS-giulianasilva and others added 4 commits April 14, 2026 10:37
- set the `--bar-border-radius` to 0 when `ion-range` has `.ticks`. previously, the bar border radius 0 was only set to the active bar.
- updated the tick's width and height
- updated the tick brackground to match the bar background
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ionic-framework Ready Ready Preview, Comment Apr 15, 2026 3:40pm

Request Review

@github-actions github-actions bot added the package: core @ionic/core package label Apr 14, 2026
@OS-giulianasilva OS-giulianasilva changed the title Rou 12467 ticks styling fix(range): update tick styling and border radius to match Figma Apr 14, 2026
@OS-giulianasilva OS-giulianasilva marked this pull request as ready for review April 14, 2026 13:49
@OS-giulianasilva OS-giulianasilva requested a review from a team as a code owner April 14, 2026 13:49
z-index: globals.$ion-z-index-100;
}

:host(.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.

How is .ticks being added to range? I couldn't find it under Host.

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.

@thetaPC, good catch! You're absolutely right! The .ticks was being added manually in that test file. I’ve updated the approach to align with how we handle the active part of the range bar and adjusted the CSS accordingly. Let me know if this looks better to you! #8ac3957

Copy link
Copy Markdown
Contributor

@thetaPC thetaPC left a comment

Choose a reason for hiding this comment

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

LGTM

@thetaPC thetaPC changed the title fix(range): update tick styling and border radius to match Figma fix(range): update tick styling and border radius Apr 15, 2026

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

}

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.

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.

Done!

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

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.

Done!

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

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.

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants