Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slider thumb misaligned with ticks #59

Open
2 tasks done
vegardlarsen opened this issue Apr 26, 2023 · 0 comments
Open
2 tasks done

Slider thumb misaligned with ticks #59

vegardlarsen opened this issue Apr 26, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@vegardlarsen
Copy link

vegardlarsen commented Apr 26, 2023

Before you start...

  • Have you updated your dependencies? You might be using an old version of the library.
  • Have you checked for an existing issue on this topic? If there is one, post a comment on it instead.

What browsers are you seeing the problem on?

Firefox, Chrome, Microsoft Edge

Description

The slider thumb is misaligned with the ticks. The problem increases with the distance from the center point of the slider, in both directions.

The problem disappears if you override the following CSS rule:

.slider .slider.orientation-horizontal .slider-thumb {
    inset-inline-start: calc(var(--fds-slider-percentage)) !important;
}

Steps To Reproduce

  1. Visit test page
  2. Look for the Slider with ticks.
  3. Slide it around. The value of the slider is 18 when the thumb visually aligns with the center of the tick.

Expected behavior

The slider thumb should visually align exactly with the ticks.

Relevant Assets

image

@vegardlarsen vegardlarsen added the bug Something isn't working label Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant