-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fixed style flickering caused by the border #24739
Fixed style flickering caused by the border #24739
Conversation
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.
Makes sense to me
Thanks for the ping Riad. Is there any other way we can address this shift, than using a transparent border? I ask because in Windows high contrast mode, the transparent border will be made opaque effectively making it impossible to see which style is active or not. |
Maybe the active style could use an outline instead of borders. |
This may also fix #24611, although that does seem to be happening without the style selection changing, possibly still worth testing though. |
I realized this when I was looking at #24611 haha. However, I couldn't replicate that scrollbar issue even though I tried exactly the same resolution given in that issue. @jasmussen, Yes you are right. It is impossible to see the selected one. I didn't know we had to think about high contrast. Thanks! The table below shows how it looks like with the outline instead of the border. (Which is my last commit) What do you think?
|
Thank you for trying high contrast mode! With the outline we're losing the border radius on the active item. Is there any way we could avoid that? Could we use a contextual padding on the preview so it doesn't rerender when unselected? Thanks for your patience! |
That seems alright to me! Does the non-highcontrast mode still look good? Thanks! |
Ship it! |
Let's get that in. Thanks for the fix @aktasfatih |
Description
In block-preview, when a style is selected, the style gets a 2px wide border, which causes a small flickering effect. This PR adds a transparent 2px border so that the style doesn't flicker with the new
is-active
border.Closes #24740
How has this been tested?
Tested it on ubuntu firefox.
1- Add an image
2- Click in between styles
Screenshots
Before:
After:
Types of changes
Added a new line of style for the border.
Checklist: