-
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
Reduce color palette options for button block #13341
Comments
Would love to see this as well, for the same reason. |
Would like to see this on all blocks as @billerickson mentions. Or even the ability to remove the "Color Settings" tab completely from certain blocks. |
There ought to be some kind of filter(s) to allow background colors for certain blocks and not allow them for others as well as what Mr. Erickson wrote. |
We have a similar situation. Two main brand colors, four secondary, five tertiary. We only want to use five colors on the buttons, two on the alerts, eight on the callouts, etc. |
We're working on a way to control the presets per block in #20588 |
This is now possible via |
Could someone kindly hint me to how I can get this done via theme.json. Is there another ticket or other form of documentation already available? That would be awesome, thanks so much. |
@ellenbauer sure thing! You can set a custom color palette just for the button block like this: {
"settings": {
"core/button": {
"color": {
"palette": []
}
}
}
} |
Added this as an example at https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/#settings-examples |
Agreed! It's a large part of what makes the addition of theme.json worth it, since it scales to any block, including third-party ones as long as it uses the block supports APIs, and should offer a lot of flexibility for site maintainers and themes. |
I'd love the ability to restrict the button block's color options for background color / text color to a subset of the editor-color-palette.
We typically have 6-10 colors in our editor-color-palette, but want 2-3 button variations.
Is it possible to reduce the color options on a per-block-type basis?
The text was updated successfully, but these errors were encountered: