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.

Global Style for normal paragraph -> Clone css class?

  • Hi,

    I created a global style for a div named ‘box-important’ which in use contains text (a paragraph) that should be highlighted. GB thus creates the CSS class ‘gb-container-box-important’.

    To use I have to create a Container, apply the global style on it, and then insert text.
    Alternatively I could get rid of the div, style a Paragraph and use the Headline-Element and change it to P.

    For other authors on the site, I’d prefer to make it more simple. I’d like to use a normal p-Block and give it an additional css class ‘important-text’. I think that’s more natural to use for other users.
    I could do that by manually entering ‘gb-container-box-important’ there — but for the client I’d prefer a simpler class name.

    Can I maybe clone the class ‘gb-container-box-important’ to a new class ‘important-text’ using Javascript?
    This way I could still edit the global style WYSIWYG but have a more natural usage in the editor.

    Thank you!

  • Hi there,

    what about creating a Local Pattern of a Headline block with the global style already added?
    So the client just has to add a pattern ?

    Let me know

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