Skip to content

[feature] Styles to accept linear gradients. #149

Discussion options

You must be logged in to vote

hi @learyjk
I'm not sure how I feel about putting a whole gradient into a variable, feels a little off.

But good news is that you can still add gradients to sliders;

<RangeSlider id="mySlider" range />
#mySlider .rangeBar {
  background: linear-gradient(90deg, var(--color1), var(--color2));
}

There's a somewhat extra example in the docs; https://simeydotme.github.io/svelte-range-slider-pips/en/recipes/price-range/ ...

but I think it's a good idea for me to put 'gradients' as a topic under the styling section of the docs to help anyone like yourself :)

Cheers!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by simeydotme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request investigating Not quite sure if it's valid, yet
2 participants
Converted from issue

This discussion was converted from issue #148 on September 24, 2024 03:07.