[Resolved] Global styles with two blocks

Home Forums Support [Resolved] Global styles with two blocks

Home Forums Support Global styles with two blocks

  • This topic has 11 replies, 2 voices, and was last updated 5 months ago by David.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2156519
    Robert

    Hi there,
    I’m trying to create a global style for a common container I use. Here are the steps I’m using:

    Create new global style with a container and a grid block inside
    Add a blank image block as a placeholder on the left side with no padding, and text block on right with 15px padding
    I also add a 1px border around the top container

    The problem is when I try to apply the global style in a post it has the main container with a border and that’s it..no grid or other blocks, padding etc…

    Since I have a lot of step-by-step tutorial guides I was hoping to create a global style that may help load speed etc…

    Link to example: https://www.painthog.com/get-started-with-abstract-acrylic-painting-step-by-step-tutorial/

    Any suggestions on how to go about this? Thanks

    Thanks

    #2156575
    David
    Staff
    Customer Support

    Hi there,

    this is really a question for the GenerateBlocks support… but to cover:

    1. Global Styles only apply to the individual block.
    2. Therefore you need to add individual styles to each block.

    and to make workflow easier

    3. Once you created your global styles, create a Local Template and apply the global styles.
    Now you can import the Local Template to the page.

    #2156591
    Robert

    sorry, about that! I have a follow up question, shall I move the topic over the generateblocks support forum?

    #2156629
    David
    Staff
    Customer Support

    You can ask it here πŸ™‚ I wont tell if you dont lol

    #2156678
    Robert

    Oh thanks. Thought I’d be blocked for generateblocks πŸ™‚

    The info helped.
    If I build custom containers with inside grids and padding, (all with global styles like border etc), can I build only one and duplicate it? Does this add unnecessary code? Or, should I build each one separately? The reason I ask is I’ve been watching the YT vids and I seem to remember being told not too copy/paste blocks with global styles. thanks

    #2156686
    David
    Staff
    Customer Support

    Global Styles with Grids are a little bit of a mind bender. As you can’t cascade a global style.
    So I would:

    1. Create a Global Style
    2. Add a Grid Block, with a Single column, style that and apply the Global Style class name to it.

    Now when i build my Local Template i would add a Single column Grid, apply the Global Style to that single column container and then Duplicate the columns from the Grid toolbar.

    #2156693
    Robert

    I was hoping to add a 1px border around the grid, but I don’t see where grids offer that. Which is why I started with a container…Am I missing something?
    Here’s an example post of what I’m trying to do, just gotta scroll down to see it; https://www.painthog.com/how-to-mix-acrylic-paint-for-beginners/

    #2156852
    David
    Staff
    Customer Support

    The Grid Block itself is simply a wrapper it doesn’t have borders etc.
    You would add the Grid inside a Container Block to do that

    #2156878
    Robert

    Okay, I see.
    So, once I build a grid and style it. Then follow your directions for creating template, I can then build one grid and duplicate it with causing any issues? Thanks again, you’re very helpful and patient

    #2156892
    David
    Staff
    Customer Support

    Yeah, that should work πŸ™‚

    #2156902
    Robert

    Great! Thanks so much, love the theme, blocks and support!

    #2156925
    David
    Staff
    Customer Support

    Awesome – thanks for the great feedback !

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