-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
don't use hardcoded values for separator styles #17076
Conversation
margin-left: auto; | ||
margin-right: auto; | ||
opacity: .4; |
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.
The WordPress Coding Standards say to use a leading zero in decimal numbers. Also, do we even need this opacity adjustment?
We discussed this in today's design meeting (Slack). While we could remove the hard coded value for opacity as well, it's not super necessary. If we do remove the opacity value, I personally think an opacity control is not necessary. I'm for removing the hard opacity (or leaving it as is without an additional control). |
What opacity control are you talking about? I think you (or I) may have misunderstood something somewhere? |
In the meeting we discussed possibly considering an opacity control (if we are to remove all hardcoded opacity value as well). |
Ah, okay. Well, adding an opacity control seems over-the-top to me. I would think that the theme should be in charge of most of the separator styling. (Actually, I'm not sure why we even have multiple style variations included in core.) |
So do you think we should remove the current |
I'm ambivalent about it, since it's in a |
Im fine either way, although I thought the goal was to remove overly specific styles? |
I think the goal of this PR was to make the block styles (both default and opt-in) work better with themes, by using values that adapt better (e.g. |
Yeah, the default styles for separators were to use a color |
Yeah, the opacity shouldn't really be a blocker for this PR. Just add a leading zero to the number, rebase the PR to get tests working, and let's ship it. A follow-up PR can remove the opacity if desired. |
Unfortunately I can't push code to this PR any longer... The source fork no longer exists and it can't be changed in the PR's reference. I'll go ahead and close this PR in favor of the newer one since we can push any requested updates there. 👍 |
Description
Avoid using hardcoded styles for separators.
This is a part of #16782, I'll try to push separate PRs per block so they can be examined and discussed separately.
Types of changes
px
toem
$dark-gray-100
color tocurrentColor
with an opacity of.4
which is pretty close on white backgrounds.The above changes make things work properly regardless of font-size used on the site, and regardless of whether the site uses a light or dark background color.
Checklist: