-
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
Separator: Remove appearance of "inset" style. #43948
Conversation
Size Change: +17 B (0%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
I'm not sure why, but I haven't been able to reproduce the original behavior. I tried using Chrome, Firefox, Safari with TT2 and TT3, but for some reason I couldn't see the left and right borders. The fix makes sense, though. |
It may be a Chrome issue... are you on Safari? |
No, I use Chrome, but I ran the That said, I know what happened: I was looking at the separators in the Post editor. I can see the original problem in the Site editor. And once I apply your fix, I see nice-looking separators. |
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.
What?
By default, the
hr
tag is styled to appear inset by the browser. The browser does this by painting 4 different border colors. For block themes that style the Separator block using theme.json, usually just the color or border width is styled, and it looks good when small:But if we zoom in, we can see something is off:
This is more visible if we change the height of the separator in the inspector:
We can here see two borders, left and right, indicating an inset style with a top left light source. An easier way to see this is to use the following in theme.json:
Then we get this:
This PR unsets the left and right border for the separator by default, so the line will always look like a solid line:
You can still set left and right borders of the separator if you like. It just isn't there by default.
Why?
This feels a more reasonable default to offer.
Testing Instructions
Insert a separator in a block theme like TT2 or TT3. Customize theme.json as outlined above, and with this PR applied you should see a square separator.