-
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
Add background colour transparency to blocks that support background colour #18095
Comments
Hmmm colorpickers already have a |
Thanks @aristath for the heads up! Indeed switching Now I am searching how to actually pass that alpha value to the component cause currently defaults to |
Added the transparency control to |
Can the transparency control also be added to |
Excellent suggestion, I will look into it! |
I would love this in general <3 I was thinking for group blocks specifically today, but things like Media & Text, or paragraph blocks etc would be nifty. |
Any news on that issue? Would love to see a fix as well |
This task is 19 years old, how about already making progress in it? This is one of the reasons why gutenberg is so lagging behind the competition, there are no basic functions that should be built in from the beginning. |
Any news on this? I'm making a new theme using blocks and I need opacity but I'm so surprised that there is no alpha selector! Don't you think alpha selection is a must-have in every serious design solution? It would be so nice to have this feature in the next Gutenberg release... +1 to add color transparency to any block that supports background color, especially the group one! |
+1; someone contacted us today for help with this. We couldn't find another way to fix it but to give them CSS. |
Maybe this will interest someone here like @supernovia? I made a filter to handle the opacity of the background color. One you have put it in your theme's function file, you just have to set the background color and add the CSS class
|
I am not able to understand why can't we simply apply to group block, we already have it in cover block working perfectly, then why group not work the same way ? If we provide rgba format color in theme.json, then it should simply show opacity parameter too to change the color opacity. |
The ColorPicker component has support for alpha transparency. In this example, I've manually set the prop to enable it for all colors (background, link etc) in the block inspector: A question is whether we should allow enabling alpha transparency via block supports, e.g., on a per block basis via block.json, or everywhere. I can't think of a reason why we would want to limit this useful and, thanks to the new color picker layout, unobtrusive feature. Still, there might be a reason for theme developers to want to limit usage of the effect. |
Hallo @dennisheiden #30493 (and #25421) employs #37731 enables alpha via the supported If you have time to test #37731 that would be great, thank you! |
@ramonjd Thanks for the clarification, this helps to prevent wasting time with obsolete PRs. ty. |
Any word on this? seems as if the time it takes to respond here would have already fixed this. As of today no transparency in the group block. Such an easy fix takes years, why? |
Hi @richwalton, #37731 was merged a couple of weeks back. The change should be part of Gutenberg 12.5, which was released a few days back. If you update the Gutenberg plugin to 12.5 you should see the following controls: |
Is your feature request related to a problem? Please describe.
In modern design transparency background colour is used frequently (e.g. sub-blocks of text in a group block). On all blocks that provide a background colour the GUI control supports colour adjustment but not transparency adjustment. This forces the user to add custom CSS for a trivial action which is counter to the intention of GB to be Wix-like and useable by ordinary consumers.
Describe the solution you'd like
On all blocks that provide a background colour the GUI control should include a transparency slider (like the opacity slider for the background image of the cover block).
Describe alternatives you've considered
Unless there is a reason I am not aware of the technical implementation would be changing the background colour setter to use CSS RBGA vs. RGB as at present. The transparency slider control should be able to reuse the opacity slider currently in use by the Cover block.
The text was updated successfully, but these errors were encountered: