You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add support for opacity style property to theme.json #46755
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] Design ToolsTools that impact the appearance of blocks both to expand the number of tools and improve the experi[Type] EnhancementA suggestion for improvement.
Users are not currently able to set the opacity of an element just from the theme.json file or Global Styles. This is a common design choice for things such as button pseudo states.
@mikachan I have read the docs and the theme.json file but I am confused where to add the opacity property since the theme.json seems to be of declaration file. I could not find the CSS file. Please share some hints or relevant resources that could be of any help, since I am new to OpenSource World.
Hey @npneeraj – any progress on this?
This is becoming important since the File block has a hard coded opacity value on hover which can't be overwritten via the theme.json yet:
Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] Design ToolsTools that impact the appearance of blocks both to expand the number of tools and improve the experi[Type] EnhancementA suggestion for improvement.
Activity
npneeraj commentedon Dec 24, 2022
@mikachan please assign me this issue / feature . I can contribute to add/do the above following task.
mikachan commentedon Dec 24, 2022
Done, thank you! ✨ I'm happy to review a PR when you're ready.
npneeraj commentedon Jan 4, 2023
@mikachan I have read the docs and the theme.json file but I am confused where to add the opacity property since the theme.json seems to be of declaration file. I could not find the CSS file. Please share some hints or relevant resources that could be of any help, since I am new to OpenSource World.
mikachan commentedon Jan 5, 2023
Hi @npneeraj. Here are some links that may help to explain the theme.json file further:
This issue is for adding support for the
opacityproperty to the theme.json file so it can be used to style blocks.Here is a similar PR for adding support for
box-shadow: #41972If you prefer, I can start a PR for this, and I'm happy for you to help by contributing code or reviewing it.
[-]Add `opacity` style property to theme.json[/-][+]Add support for `opacity` style property to theme.json[/+]npneeraj commentedon Jan 6, 2023
Hi @mikachan . Thanks for sharing the above resources.
Please start a PR for this for future code contributions and code-reviews.
hanneslsm commentedon Oct 27, 2023
Hey @npneeraj – any progress on this?
This is becoming important since the File block has a hard coded opacity value on hover which can't be overwritten via the theme.json yet:
gutenberg/packages/block-library/src/file/style.scss
Line 45 in 8f3392b
npneeraj commentedon Oct 28, 2023
Hi @hanneslsm - sorry to say, it appears to be a dead-end.
t-hamano commentedon Jul 14, 2025
I'd like to confirm if it's still worth working on this issue. Personally, I think it is.