angular-slider / ngx-slider

Self-contained, mobile friendly slider component for Angular based on angularjs-slider
https://angular-slider.github.io/ngx-slider/
MIT License
388 stars 175 forks source link

How to show tick legends but not ticks #344

Open massic80 opened 1 year ago

massic80 commented 1 year ago

Similarly to #343 , I'd like to show the legends, automatically added when setting a stepsArray and showTicks or showTicksValues , but not the tick dots. At the moment I overrode the CSS, but I'd prefer an option to do it within the APIs.

ms270169 commented 1 year ago

How did you override CSS?

Modification in global file styles.css works:

.ngx-slider-tick {
   width: 0!important;
   height: 0!important;
}

But I would prefer a local solution in the component where the slider is used. Any ideas?

massic80 commented 1 year ago

Hi, I don't remember the override (I made an amend to someone else's style customizaton), but I can see a

.ngx-slider-tick {
    background-color: transparent !important;
}

and I figure out I implemented this solution in order to avoid "repositioning" other parts. I'd prefer a parameter to do the same without "breaking it up"