Code Monkey home page Code Monkey logo

Comments (3)

simeydotme avatar simeydotme commented on August 18, 2024

hi, @gbcreation this is not considered a bug, this is the correct styling/behaviour as I intended. You may set the css color values for in-range and selected to be the same if that's your desired aesthetic :)

--range-pip-active-text: orange;

from svelte-range-slider-pips.

gbcreation avatar gbcreation commented on August 18, 2024

Hi @simeydotme thank you for your quick answer. --range-pip-active-text works indeed for the color of the pip text, but not for the color of the pip (small line) itself. See this new REPL. Is there another CSS variable for that?

from svelte-range-slider-pips.

simeydotme avatar simeydotme commented on August 18, 2024

--range-pip-active: orange;

:)

I should have documented all of these, but essentially u can inspect the elements with devtools and see all the css variables;

image

all the variables have an override (--range-xxxxxxxx) value which is not set, so to override the default colors, just set those properties that begin with --range-

.rangeSlider {
  --pip: var(--range-pip, lightslategray);
  --pip-text: var(--range-pip-text, var(--pip));
  --pip-active: var(--range-pip-active, darkslategrey);
  --pip-active-text: var(--range-pip-active-text, var(--pip-active));
  --pip-hover: var(--range-pip-hover, darkslategrey);
  --pip-hover-text: var(--range-pip-hover-text, var(--pip-hover));
  --pip-in-range: var(--range-pip-in-range, var(--pip-active));
  --pip-in-range-text: var(--range-pip-in-range-text, var(--pip-active-text));
}
.rangeSlider {
  --slider: var(--range-slider, #d7dada);
  --handle-inactive: var(--range-handle-inactive, #99a2a2);
  --handle: var(--range-handle, #838de7);
  --handle-focus: var(--range-handle-focus, #4a40d4);
  --handle-border: var(--range-handle-border, var(--handle));
  --range-inactive: var(--range-range-inactive, var(--handle-inactive));
  --range: var(--range-range, var(--handle-focus));
  --float-inactive: var(--range-float-inactive, var(--handle-inactive));
  --float: var(--range-float, var(--handle-focus));
  --float-text: var(--range-float-text, white);
}

If you want to contribute by adding some documentation for that to the gh-pages branch please go ahead, for now I'll pin this topic until I get some time to work on it.

from svelte-range-slider-pips.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.