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

[Question] Use of position: absolute for marks #203

Closed
loichuder opened this issue Dec 3, 2020 · 1 comment · Fixed by #208
Closed

[Question] Use of position: absolute for marks #203

loichuder opened this issue Dec 3, 2020 · 1 comment · Fixed by #208

Comments

@loichuder
Copy link
Contributor

First of all, thanks for the nice package. I was happy to land on it after a few unsuccessful tries with other packages.

Description

I tried the recently added marks and noticed an odd behaviour: position: absolute must be explicitly set by the external CSS of the marks for them to be properly placed (see image and sandbox below).

On the other hand, tracks and thumbs do not need this as the position: absolute is already set by ReactSlider itself: https://github.com/zillow/react-slider/blob/master/src/components/ReactSlider/ReactSlider.jsx#L946 and https://github.com/zillow/react-slider/blob/master/src/components/ReactSlider/ReactSlider.jsx#L957.

Is this the expected behaviour or should ReactSlider set position: absolute for the marks as well for consistency ?

CodeSandbox

image

Edit zillow/react-slider

@stonebk
Copy link
Contributor

stonebk commented Jan 21, 2021

I agree, the inconsistency is not great. It would probably make sense to add the positioning like we do with tracks and thumbs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants