-
Notifications
You must be signed in to change notification settings - Fork 172
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
Fix slider margin #5392
Fix slider margin #5392
Conversation
mcslayer is not a collaborator of the repo |
I think it looks good, @lyubomir-popov can you give a design review here? |
There still seems to be a bit of baseline drift if text in paragraphs is added between sliders. You can see that the middle paragraph moves onto the baseline a bit, and the one on the bottom even more. ![]() The baseline alignment is quite tricky, especially in such old components like slider, so no worries if you can't figure that one out @mcslayer. We can have a look ourselves as well. |
Yes, I’ve double-checked the calculation, and it is correct. |
That looks promising. I think you can push the code so that we can see it in the demo server. Thanks for exploring! |
c1c889d
to
6d509ad
Compare
Unfortunately, I found a problem with Firefox where the slider height was calculated incorrectly because Firefox includes the thumb in the input height by default. I figured out how to fix it, and I've applied the fix. I've attached screenshots showing Safari, Chrome, and Firefox (before and after the fix) for comparison. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Demo updated to include latest changes
Looks good to me - tested on firefox, chrome, and safari and there are no longer spacing differences between them and the margin is fixed on all of them.
@bartaz Have a look and let me know if I've missed something 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for chasing that one down @mcslayer
Done
Based on the comment of @lyubomir-popov, it seems we need to reduce the top and bottom margins by half the height of the track.
I'm not sure if the calculations needed to be enclosed in parentheses, but I did so for better code readability.
Fixes #5391
QA
Check if PR is ready for release
If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:
Feature 🎁
,Breaking Change 💣
,Bug 🐛
,Documentation 📝
,Maintenance 🔨
.package.json
should be updated relative to the most recent release, following semver convention: