Closed Kovas closed 17 hours ago
Dealing with default button and icon styles is frustrating. Every time I create a button, I have to apply my own class and remove the pre-set block styles.
I agree, this is annoying. I'd like to add a simple PHP filter that allows you to set the default attributes of the Button variation. This would allow you to set a Global Style by default and skip all of the other attributes.
adding an icon overrides my existing button class settings, like gap and some other settings.
This shouldn't happen. We specifically check to see if those options don't already have a value before setting them. Logging this as a bug so we can look into it.
The filter above is now in GB2, so you can filter the default attributes for the Button block.
Example here: https://github.com/tomusborne/generateblocks/pull/1503
Dealing with default button and icon styles is frustrating. Every time I create a button, I have to apply my own class and remove the pre-set block styles. The same issue happens with icons—adding an icon overrides my existing button class settings, like gap and some other settings.
Wouldn't it be better to have an option in the GB settings to define a default button class? As for icon styles, perhaps an option to disable default styling would be a good solution, though I'm not sure what the best approach is.