• Resolved KS

    (@karl19)


    Hello, when adding a new row layout block, it gets a bottom margin connected with a unique class, eg:

    .kb-row-layout-wrap.wp-block-kadence-rowlayout.kb-row-layout-id330_c84f64-98 {
    margin-bottom: 0px;
    }

    I would like to remove this automatic bottom-margins, so that I can set a generic 70px bottom margin to all row layout blocks, but still be able to override these settings for a block in the admin.

    If I define the following in my stylesheet:

    .kb-row-layout-wrap.wp-block-kadence-rowlayout {
    margin-bottom: 70px;
    }

    it doesn’t override the ID-specfic code above, that gets added automatically. If I write:

    .kb-row-layout-wrap.wp-block-kadence-rowlayout {
    margin-bottom: 70px !important;
    }

    it overrides the ID-specific element above, but then I can no longer override this value by selecting a bottom margin for a row layout in the admin.

    I don’t understand why all row layouts get a bottom-margin by default and how I can flexibly get rid of it?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support architalevelup

    (@architabasandrai20)

    Hi @karl19,

    I’m glad you reached out, and I’d be happy to help.

    You can use the Block Default functionality for this. Add the margin-bottom to your Row Layout, then save the block as default from Block Settings > Advanced > Block Defaults. From then on, any new Row Layout you add will automatically include the margin-bottom.

    Just to note: this won’t affect the Row Layouts you’ve already added, only the new ones moving forward.

    Check the documentation here: https://www.kadencewp.com/help-center/docs/kadence-blocks/setting-block-defaults/

    Check the screencast for reference: https://share.zight.com/rRuRDE7k

    I hope this helps. Let us know if we can assist you further.

    Best Regards,
    Archita

    Thread Starter KS

    (@karl19)

    Hello Archita, many thanks for the reply and also for making the screencast!

    Block defaults are useful and I’ve used them in the past, but precisely because they only add settings to new blocks getting added, I find they lack usability a lot of the time, especially if you already have a lot of content on your site using Kadence blocks.

    To my mind, it would be more powerful to be able to define generic defaults that apply to a block’s settings, unless those settings have already been defined for a specific block. That way, I could change the defaults for all specific blocks, not just new ones getting added.

    In my specific case, what I don’t understand is why Kadence adds a margin-bottom of 0 to the unique class of the block and not just to the block in general? If it added the margin to the “kb-row-layout-wrap” class instead, it would be easy enough to override this in your stylesheet, but because it gets added to the unique class, it complicates settings real defaults..

    Plugin Support architalevelup

    (@architabasandrai20)

    Hi @karl19,

    Thank you for sharing such detailed feedback.

    Here’s a quick screencast showing the behavior: by default, the row layout doesn’t add any margin: https://share.zight.com/d5u5j0Wv

    If you add a background color to the row layout, the edge padding (left and right) will automatically be applied to the Row Layout blocks once the background is selected.

    Could you please share the URL of your website? This will help me pinpoint exactly what’s happening on your site and provide more specific guidance.

    If you don’t want to share the URL publicly. You can also submit a support ticket via these channels.

    Thanks.

    Regards,
    Archita

    Plugin Support architalevelup

    (@architabasandrai20)

    Hi @karl19,

    I hope you’re doing well. I just wanted to follow up since it’s been a while, and I haven’t heard back from you.

    Has the issue been resolved on your end? If not, or if there’s anything else you need help with, feel free to reach out. I’d be happy to assist further.

    Please note that you can also submit a support ticket via these channels.

    Thank you for your understanding!

    Regards,
    Archita

    Thread Starter KS

    (@karl19)

    Hello @architabasandrai20 many thanks for following-up on this, I just now realised that I had not replied. After delving deeper into this, I noticed I had “margin-bottom: 0px;” showing on some websites using Kadence and one some it wasn’t.

    It turned out the “margin-bottom: 0px;” is not coming from Kadence, but from the GeneratePress theme. And now I feel pretty daft, but I actually had this issue last year and cleared it with the GP support team – but I managed to forget about it and didn’t find it when I was looking for solutions! https://ww.wp.xz.cn/support/topic/generate_do_wp_block_margin_bottom/

    Sorry about that, should be all clear now and hopefully after clarifying this twice, I might actually remember it next time!!

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.