Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Restore visual separator between mover buttons when show button label is on #57640
Restore visual separator between mover buttons when show button label is on #57640
Changes from 3 commits
3412065
a1505f6
101bb7b
b8af412
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I think
translate(-50%);
meanstranslate(-50%, 0);
. Strictly speaking, it is not vertically centered.I tried changing it to
translate(-50%, -50%)
to align it vertically, but the border seems to bleed.Instead, I tried using a negative margin to shift the border up by half the height value. This approach draws a solid border in my environment. Could you test if this approach works in your environment?
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.
Right.
Are you on Windows or some GNU-Linux distro? What browser are you using? What display type and resolution?
The root problem is that the toolbar height is 48px. The mover buttons height is 24px. A vertically centered 1 pixel horizontal line would need to be placed at exactly 23.5 pixels. However, a physical pixel can't be split in two. Some operating systems / browsers / displays (retina resolution, sub-pixel rendering) may render that more nicely than others. The 'bleeding' depends on the ability to position an element to 'half a pixel'. In environments where a CSS pixel is actually more than one physical pixel that may work better. In your screenshot, the horizontal line is actually 2 pixels, apparently that's because your environment isn't able to render sub-pixels.
The top margin approach actually computes to
margin-top: -0.5px;
. In your environment it may preserve the height of the line to 1 pixel but I guess the line isn't vertically centered.Environments that support true subpixel rendering won't trigger this issue. The only reliable way to avoid a greyish blurred line or its rendered height to be altered would be to make sure it is moved to a 'full pixel' e.g. by making the toolbar height an odd number.
Maybe
translateZ(0)
may help prevent the blurriness because it promotes the element to its own layer but there's no guarantee the line will be vertically centered. Alsomargin-top: -0.5px;
doesn't guarantee the line will be vertically centered but I'd think that's batter than a blurred line.For the records, this is how the translateY approach looks in my environment (zoomed in): no blurring or doubled height:
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.
This comment doesn't seem to be related to the actual pseudo-element style, so how about deleting this comment?