-
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
ColorPalette: white palette color merging with white background #5598
ColorPalette: white palette color merging with white background #5598
Conversation
Fixing white color from ColorPalette block merging with the background
Why not add transparent border for all with 20% opacity from black? it removes the conditional but and applies to colors that are very close to white too. like |
Adding black border with 20% opacity to all colors to cover multiple scenarios (all colors that are close to white + multiple ways of declaring white in the ColorPalette)
That's a very good point. I guess I've seen |
Using a pseudo class to add an inset box-shadow would allow for the border to match the same colour as each option, as otherwise the grey kinda looks bad against darker colours.
|
That's super clever. Thanks for digging into it! |
inset box-shadow allows for the border to match the same colour as each option
@paulwilde assuming this works on all colors this is the preferred way for me: #5598 (comment) Thanks for digging into this everyone. |
ColorPalette block allows to provide custom colors but in case we have white (#fff) color among them it may be confusing for the users as it will merge with the background.
This PR solves it by adding a thin border around the white colour so it stands out (border color matches the border from '.components-panel__color-area' class)
How Has This Been Tested?
Insert ColorPalette component in some part of the editor i.e: existing 'paragraph' block for test purposes and verify that white colour stands out.
Sample:
Screenshots (jpeg or gifs if applicable):
Before fix:
After fix:
Checklist: