-
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
PanelColorSettings: Make it easier to select 'Transparent' as a color option #42170
Comments
I've tried to replicate this behaviour using PanelColorSettings on trunk but I haven't managed it. I'm wondering if it's something to do with this line? setAttributes( { background: background || DEFAULT_BACKGROUND } )
PanelColorSettings uses PanelColorGradientSettings, which supports the Have you tried this? <PanelColorSettings
...
enableAlpha={ enableAlpha }
/> Does that help? |
@ramonjd Yes, you are correct. The behavior occurs at the intersection of
Because the block uses
Yep, I discovered that yesterday. However, the UI isn't particularly intuitive:
Given
|
It does take a few clicks, and seems more buried that it needs to be. Maybe a workaround would be to have a quick access button than opens the custom control with alpha immediately. 🤷 Could be a good one for design review @WordPress/gutenberg-design
8-value hex (RGBA hexadecimal notation) codes are valid, maybe not as common as 6-value ones. See: |
I learned something new! And apparently the last two digits ( |
Great! I've updated the issue description accordingly. |
What problem does this address?
At WordPress.com, we’ve implemented a Timeline Block that includes a default background color: https://github.com/Automattic/wp-calypso/blob/17256c5b7b410d332188f1a13c4b3055c1ea9de0/apps/editing-toolkit/editing-toolkit-plugin/jetpack-timeline/blocks/src/timeline-item.js#L135
A user can select a new background color for their Timeline Entry. However, when they deselect their color, they're returned to the default background color:
It's not possible for them to clear the default background color entirely. Ideally, they'd be able to select 'Transparent' as a color option.
What is your proposed solution?
While it's possible to achieve transparency with
enableAlpha
, it's not obvious.I'd love some form of button that makes it one-click to apply transparent as a color.
Some relevant conversation in Automattic/wp-calypso#65266 (comment)
The text was updated successfully, but these errors were encountered: