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.

default button styles

  • Hi,
    Is it possible to setup a default button CSS style for a site.
    Currently I have to use global styles, unassign the default and then apply a new style.

    I wondered if there is a way to define default CSS so that if a button is created and no styles applied it has a default style (colours, padding, margin, border radius, hover, etc).

    Thanks
    Ben

  • Hi there,

    it is possible to use some PHP to set the default button styles, see here for an example:

    https://docs.generateblocks.com/article/sync-gb-button-style-with-generatepress-theme/

    However, my personal preference would be to set up the Global Style on a button and then save that as a Pattern.
    Then just add the Pattern whenever you need the button style.
    This method allows you to update the global style in the future and apply site wide changes in one place.

  • Would it work if I set a fixed style to button.gb-button and button.gb-button.is-checked in “additional CSS”?

  • Yes, it will.

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