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 styles

  • Hello,

    About global styles : is it a “proper” way if I copy a block from a page(with some settings) into a global style ? And then, I change settings of this new global style in order that the original block changed accross all pages it is in?

    Here is my problem : I used a same block (but with different text inside) into differents pages. Unfortunatly, I forget to create a global style at the beginning

    I know it’s not ok to copy a block into glbal style, like it will import the CSS of this code into the global style and change it.

    But like that’s what I wish to , is it ok if I’m doing this way ? Or will it create problems ?

  • Hi there,

    Can you confirm which version of GB and GB PRO you are using?

    It sounds like you are using GB 1.8 and GB Pro 1.6 which means you are still using the legacy glboal style, if you upgrade GB to 1.9 beta and GB Pro to 1.7 beta, you will see a new global style.

    The new global style allows you to clone an existing block’s style as a new global style.
    https://docs.generateblocks.com/article/global-styles-overview/
    https://docs.generateblocks.com/article/creating-a-global-style/

  • Hi Ying

    Indeed this is the legacy global style.

    The site I’m working on is scheduled to be inline at the end of the month. DO you think I can use the new version on it ?

  • Hi there,

    The current versions of GB and GB Pro are currently in Beta. While no breaking changes will be introduced in this version, there may still be a few bugs that need ironing out. Therefore, it is not yet recommended for use on a live site.

    Hopefully, we can release the RC or stable version by the end of this month so you can fully utilize it on a live site.

  • Hi Alvind

    Thanks for the information

    With the new global style manager : is it possible to modify an already existing global setting with the settings of a current block ? (Like we can do when creating)

    And when creating a new global : when I copy a block, I have to disable the setting of this block when I applied the global settings, isn’t it ?

  • With the new global style manager : is it possible to modify an already existing global setting with the settings of a current block ? (Like we can do when creating)

    When you say already existing global setting, do you mean the legacy global style?

    And when creating a new global : when I copy a block, I have to disable the setting of this block when I applied the global settings, isn’t it ?

    What do you mean by when copy a block? copy a block then paste to where? can you explain some more?

  • Hi Ying,

    Sorry I was unclear

    1/ No, it’s about the new global style. When I create a new global style, I can choose “copy from an existing block”
    But when the global style is already created, is there a way to d the same thing if I wish to modify ?

    2/When I create a global style, I can choose “copy settings from an existing block”. When I do that and apply this new global style to the block from which I copy the settings, do I have to disable all settings for this block ?

    (for example, let’s say I have a block with 30px padding. I create a global and copy the setting from this block. The global setting willl have 30px padding. And if I apply this global to the block that already have 30px padding, do I have to undo the padding of this block or the global will override the custom setting ? )

  • Hi there,

    When you first Create a Global Style you have a few options to create a new style:

    COPY
    This will a) create a global style with the local the block styles and b) keep the local block styles.
    After creating the global style you can clear the local block styles if you want:

    https://app.screencast.com/kqGSwvhizN0bC

    MOVE
    This will a) create a global style with the local the block styles and b) CLEAR the local block styles.
    this means you do not have to clear the local block styles.

    Once you have created a Global Style to amend that style you need to edit the Global Style.
    You can click any global style tag or choose the edit option from its 3 dot menu:

    https://app.screencast.com/OVn2xIDMTh8eX

    What you cannot do is push more local styles to a global style.

  • Hi David, thanks for the informations

    One more thing about “Legacy’s migration” : Are all blocks using a legacy pattern will be automatically updated when migrated a legacy pattern to a new one ?

    For example : let’s say I have a local pattern block before footer with 60px margin bottom.
    I’ve placed it on all my pages

    When I migrate this legacy template to a new one, are all those blocks before footer wiil be updated ? And so, if I want to change the margin bottom to 30px, I will just have to change the new local pattern ?

  • Local Patterns have no connection with each other. Once added to a page they are a static set of blocks.
    If you added a pattern to every post and updated one of them it will not update all the other posts.

    But if you used a GP Block Element to hook that pattern in before the footer then you would just change the GP Block Element and it would update everywhere the hook is displayed.

  • Thanks for your answer. Unfortunatly there is some random text inside the box. With the new local global systme it would be ok but I’ve created this pattern before. T-T …. That’s why I was wondering if I could do something for that :p

  • Hi David

    I re-open this ticket for a question about global style :
    I have a block “B” into a grid (the whole thing is in a block “A”). Block “B” have 50% width. It is blanck inside and there will be an background image in it

    WHen I create a global style for block “B” and choose “MOVE” the settings, there is 50% width in the global style but the block is no more 50% width. It’s like it’s 50px.

    Is there something I do wrong ?

  • Can I see the section in question on your site?

  • Hi Ying

    Here is a link (it’s under construction) For the purpose, I’ve created a local pattern.

  • You cannot set the width of a grid block column using either the legacy or the new global styles.
    The grid block adds additional (hidden) HTML for the columns and the local block styles adds the width to that hidden column.

    If you need to build that kind of layout with % width columns in a row.
    Then use a Container Block with a Flex layout instead of the grid block.

  • Hi David,

    Ok, thanks for the information 🙂

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