-
robert15
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/EtPDH9usxCcIoYou 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 usebutton
to target it.If it’s a text block with a
p
tag, then target it withp
, etc.There’re many ways to target an element. Let me know if there’s anything unclear 🙂
-
jasongreen
@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.
- You must be logged in to reply to this topic.