Site logo

[Support request] Disabling auto gb-inside-container

Home Forums Support [Support request] Disabling auto gb-inside-container

Home Forums Support Disabling auto gb-inside-container

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2255202
    Sam

    Hi,
    consider this scenario :
    I created an element -> added a container -> added a heading.
    Pretty simple right?

    GP automatically adds a gb-inside-container div inside of my container element. That inside div (in my case) isn’t necessary, non-semantic and I have no way of controlling its visual aspects except via custom CSS.

    Any way I can prevent GP from adding this auto div?

    #2255234
    David
    Staff
    Customer Support

    Hi there,

    that comes from the GenerateBlocks plugin container block. And currently there is non way to remove, its something we may address in a future update to the GB Plugin.

    Its main purpose is for setting a different inner content width, and for stacking order. Aside from that there should be no visible styles. What issue are you having ?

    #2255245
    Sam

    Hello David,

    I had some weird CSS issue when I tried to edit a GB hero pattern but, I was able to solve that.
    It’s just that I don’t like having unnecessary/non-semantic html elements.

    #2344492
    akal

    Hi David,
    even if I totaly understand its purpose, I’m also wondering if it wouldn’t be a good choice to give to the user the ability to prevent its auto generation. I’ve different scenarios :

    – When I use uikit (like bootstrap), I have sometime css issue because of this extra container (like for modals, when I add data-parameters to a grid, uikit applies some CSS to the 1st child grid which is the inside-container, so I have to write extra CSS to target this child.
    – Or when I use a template (yes I could do it in another way…) to display a canvas as background which gave me :

    <div class="gb-container gb-container-0292be8f" id="particles-js">
    <div class="gb-inside-container"></div>
    <canvas class="particles-js-canvas-el"></canvas>
    </div>

    Which doesn’t leads any issue, but still “unnecessary/non-semantic html elements” (as Sam said)…
    Yes this is not an issue, but – in my humble opinion – considering a kind of checkbox “disable inside-container” in the grid block option panel would give a better control ^_^

    #2344642
    David
    Staff
    Customer Support

    Hi there,

    we’re currently working on an update to the Container Block.
    this will remove the div.gb-inside-container from the Container Block by default.

    For use cases where the inner container is required, users will be able to add another Container inside it, and to simplify that process we will add a Variant Container Block that does that for you.

    Any legacy containers will keep their current structure ie. with div.gb-inside-container but we will have an option to convert them to the new version.

    This update will give you guys what you need and will allow us to utilise the container block for other purposes in GB.

    #2344664
    akal

    Great news ! Thank you guys to make wordpress much more fun to work on ^_^

    #2345585
    David
    Staff
    Customer Support

    You’re welcome

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