Navigation Block: Add transparency slider for submenu background#69379
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Hi @ajitbohra |
|
@dhruvikpatel18, do you mind rebasing this branch? That should resolve CI failures. |
07bb07f to
0fbeedc
Compare
|
Thanks for the rebase, @dhruvikpatel18! What do you think about enabling transparency for other color settings as well, just to make it consistent? Seems odd to have it only enabled for once, even if it might get more actual use. |
|
@Mamaduka, Thank you for the feedback, I agree that enabling transparency for all color settings would provide a more uniform and flexible user experience. I'll modify the code to enabling transparency for other color settings in the
|
|
Thanks for the follow-up, @dhruvikpatel18! Rebasing should fix the failing e2e test. |
a90fac1 to
3e447df
Compare
…dPress#69379) Co-authored-by: dhruvikpatel18 <dhruvik18@git.wordpress.org> Co-authored-by: ajitbohra <ajitbohra@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: cuemarie <plari@git.wordpress.org>
Closes: #53487
What?
This PR adds the ability to set a transparent background for Navigation Block submenus by enabling the alpha (transparency) channel in the color picker for the submenu background setting.
Why?
Currently, users who want their submenu background to be transparent (to match the transparent background of the navigation block) have to use custom CSS. When no background color is set, submenus default to a white background, and the existing color picker doesn't allow for transparency settings.
This improvement creates a more intuitive user experience by allowing transparency to be set directly from the editor interface without requiring custom code.
How?
The implementation adds the
enableAlpha: trueproperty to the color settings for the submenu & overlay background in theColorGradientSettingsDropdowncomponent. This enables the transparency slider in the WordPress color picker component, allowing users to select any level of transparency for submenu backgrounds.Testing Instructions
Select a custom color
Screenshots or screencast
Before
Before.mov
After
After.mov