-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Allow disabling the shadow panel #48753
Comments
Where did you find the |
One other question, I can't find a disable option for the other options, like border. Should that be added as well? Why only for the shadow? Or am I missing something? :) |
From the shadow PR #46502 and theme.json https://github.com/WordPress/gutenberg/blob/trunk/lib/theme.json#L190 Shadow is enabled by default. Border is opt-in, disabled by default. |
It follows the same pattern as other settings: |
I went as far as trying the above and this and the empty shadow panel still shows (as reported by Carolina).
|
This is not specific to the button block. It also shows up on column blocks. |
Yes this issue is a bit out of date since the shadow controls changed in WP 6.5. |
This issue could not be reproduced in the latest Gutenberg. It seems that we just need to set {
"$schema": "../../schemas/json/theme.json",
"version": 3,
"settings": {
"appearanceTools": true,
"layout": {
"contentSize": "840px",
"wideSize": "1100px"
},
"shadow": {
"defaultPresets": false
}
}
} I would like to close this issue, but please feel free to reopen it at any time if the problem reoccurs. |
I still don't think this is the correct solution since the name of the option is to literally set the default presets to false, not disable the option. 🤷♀️ |
I believe what is considered a bug in this issue is that the panel is unintentionally displayed even though there is no preset. This issue has already been resolved. Furthermore, I believe that the specification that the panel's visibility depends on whether there is a preset is consistent across colors, font sizes, and shadows. What is the correct solution required here? |
Colors has text, background, link heading etc that is a boolean set to true or false, which are separate from disabling presets. |
I see, so you want to be able to set a boolean instead of an array, as mentioned in the comment? Either way, that would be considered an enhancement, and it's not just limited to shadow presets, so it might be best to open a new issue. |
Description
There is no way to turn off the Shadow panel in Site Editor > Styles > Blocks > Button
If theme.json turns off all presets, the panel still shows, but it has no options.
Step-by-step reproduction instructions
Add the following under
settings
in theme.json:Screenshots, screen recording, code snippet
The panel shows but there are no options:
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: