Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Buttons with new global styles

  • krempel-und-co

    Hello!

    I have an issue with the new global styles when it comes to buttons:

    I have the global style class .cstm-button which sets font, background-color, hover effects, text color, padding. So far so good.

    When I add a new button the button has the default blue style which doesn’t get overwritten when I add the custom style class .cstm-button as it’s background-color etc. is overwritten by the settings in the “Color”-Section of GB.

    I know it’s intended that I can customize the look and feel via css on a element level which overwrites global settings. But with the legacy global styles I could set the button as “primary” or “custom” and the default settings were overwritten.

    Am I missing something? Is there a better way to style default buttons in GP/GB and global styles are for those cases where you want to change the default look?

    Thanks!

  • Hi there,

    currently you can either Clear the local block styles after adding the global style.
    By removing the block global style tag:

    https://docs.generateblocks.com/article/editing-a-global-style/#block

    Or my preferred workflow is:

    1. style the button as you require in the local styles.
    2. create a new Global Style and MOVE the local block styles.
    3. now create a Pattern of your Button.

    Now when adding buttons to your page, use the Pattern.
    As the new patterns are same CPT as the core patterns you can even use the / shortcut to find them in the block appender.

  • This process should be easier. Creating a pattern for a button is a workaround not a solution. We should be able to style the appearance of the default button within the editor.

  • We have some plans for setting “theme” level styles which is where a default style can be set for a button.
    But for now the Pattern method is the best way to go.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.