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.

Button styling in the GB 2.0

  • Hi,

    I want create some styling options for the Generateblocks buttons. Before you could target the .gb-button, but since the GB 2.0 all of the selections like .gb-button or .gb-container and so on have been removed.

    What is the best selector now to target those elements?

  • Hi there,

    You should be able to see each block’s unique class, for example, gb-element-xxxxxxxx
    https://app.screencast.com/EtPDH9usxCcIo

    You can use that class to target the element, or you can add a class for the block in the Advanced panel and target them with the class you defined.

    If it’s a button block with a link, you can simply use a to target it, if it uses <button> tag, then you can use button to target it.

    If it’s a text block with a p tag, then target it with p, etc.

    There’re many ways to target an element. Let me know if there’s anything unclear 🙂

  • @Ying – This change is disruptive. I have a lot of CSS across multiple sites based on the gb-container class and now I have to manually add the class to new containers. Why did you guys remove this?

  • Why did you guys remove this?

    Because it benifits the performance.

    GB v2 is so powerful that I bet you might not need most of your previous CSS anymore.

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