question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feat: Ability to modify ion-range pin css

See original GitHub issue

Feature Request

Ionic version: [x] 4.x

Describe the Feature Request In Ionic3 we were able to modify the pin to append text (like money or a percent) like this:

.range-pin {
  color: white;
  font-family: sans-serif;

  &after:{
    content: " %";
  }
}

And in Ionic4 it seems from everything I can read that this simply isn’t possible, which feels like I’m taking crazy pills. Something this simple shouldn’t be so hard.

Describe Preferred Solution Either make <ion-range-pin> it’s own component so that we can edit its’ css directly like we can <ion-input>.

Describe Alternatives Make every possible css property a css custom variable? It feels bonkers that I can’t simply modify the .range-pin class. It’s 2019 and I can’t do things I could 20 years ago.

Related Code .range-pin {} isn’t modifyable

Additional Context https://stackoverflow.com/questions/56995766/how-do-i-change-ionic-4s-ion-range-pin-font-and-formatting

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
webcat12345commented, Oct 3, 2020

If you’re using an Ionic version and already uses CSS Shadow Parts 3 then you can achieve this by using:

ion-range::part(pin) {
  transform: translate3d(0px, -24px, 0px) scale(1);
}

There you can use knob and others from here

1reaction
meghajayakumarcommented, Oct 21, 2019

Any update on this feature request? I am having a similar use case where I have to include custom text and styles to range-knob and range-pin.

Read more comments on GitHub >

github_iconTop Results From Across the Web

feat: Ability to modify ion-range pin css · Issue #18767 - GitHub
Something this simple shouldn't be so hard. Describe Preferred Solution Either make <ion-range-pin> it's own component so that we can edit its' ...
Read more >
Developers - feat: Ability to modify ion-range pin css - - Bountysource
Either make <ion-range-pin> it's own component so that we can edit its' css directly like we can <ion-input> . ... Make every possible...
Read more >
How do I change Ionic 4's ion-range pin font and formatting?
I found the solution, it was just because in the html of ion-range I had color="primary", so I guess it was overwriting my...
Read more >
How To Customize Ion-Range In Ionic 5 - ADocLib
The ion-range component is one of many Ionic Framework components used to The Range slider lets users select ... feat: Ability to modify...
Read more >
ion-range: Slider Knob Controls with Labels - Ionic Framework
ion-range lets you select from a range of values by moving the slider. It accepts dual knobs but one controls the value and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found