Skip to content
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

Support Color Settings #109

Open
janwidmer opened this issue Jul 10, 2022 · 4 comments
Open

Support Color Settings #109

janwidmer opened this issue Jul 10, 2022 · 4 comments
Assignees

Comments

@janwidmer
Copy link

Default Gutenberg Components offer the option to set a font / background color. This widget is offered by gutenberg and can also be implemented for custom blocks, see https://awhitepixel.com/blog/how-to-add-color-settings-to-your-custom-gutenberg-block/

It would be great, if this block could also support the colors widget.

@tschortsch
Copy link
Member

Thanks for bringing in this idea. But I think there could be an issue with using the colors defined in WordPress. I don't think they would match the color names of your bootstrap setup (like primary, secondary, ...). That's why we created it as a separate list of colors (which can be extended via a filter). But maybe I'm missing something (?)

@tschortsch tschortsch self-assigned this Jul 29, 2022
@alahmnat
Copy link

I second this request.

At the very least, reading in the theme colors would be beneficial, because at least for the sites I build, I don't tend to mess around with the default colors for Bootstrap in the package itself. I also don't use Bootstrap's primary/default/etc. style conventions when building block-level elements. All that stuff lives in its own definitions and draws off of WordPress's theme palette whenever possible, because everything else in Gutenberg is geared toward it.

For now I'm getting around this by adding a group element inside the column, setting the column's padding to 0, and adding the padding and background color to the group instead. It would be nice to do away with that extra element, though.

@stevenbrown-85
Copy link

+1 for this - having bootstrap defaults and being able to set custom colors would be great

@r3volution11
Copy link

Another +1. I just installed and I was hoping to change the built-in colors for the primary and secondary by simply defining them again in block-filters.js. No luck, no I just have duplicates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants