Support » Plugin: Gutenberg Blocks and Template Library by Otter » Section Block forces “justify-content: unset” after update

  • Resolved quasiDigi

    (@quasidigi)


    Hello,

    Since last update, after editing an already existing post, justify-content: unset is added to the block’s css. This has as consequence that I need to manually add a max-width and specify the justify-content value of ALL the Section Blocks I’ve been using, post by post. Setting those values in the General Otter Blocks Options do not do the trick.

    I’m creating a Neve child theme with its own style sheet. In this file all those styles are already defined. So, we’re having a lot of redundancy and unnecessary style sheets creation (goodbye page speed). Mainly because ALL Section Blocks have the same style.

    Is there a way to disable the creation of ALL custom styles for Otter Blocks? I prefer to handle all styles in the style sheet of the theme child.

    Please do not tell me to use !important.

    Thank you for this great plugin.

    PS: The website linked has the old version of the plugin, so you will not be able to see the problem there.

    PS2: Reverting to previous version (1.5.12) works fine

    • This topic was modified 1 month, 3 weeks ago by quasiDigi.
    • This topic was modified 1 month, 3 weeks ago by quasiDigi.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Hardeep Asrani

    (@hardeepasrani)

    Hey @quasidigi,

    We redid the CSS generator in the last version to make it faster and less error-prone. We see the issue with section block rendering a lot of duplicate CSS and that’s already been a pain point for us too. We’re also working on making Section reuse the CSS which should be out in one of the future releases.

    For now, there’s no way to really stop the plugin from outputting its CSS. We can tell you how to do that if you’re willing to edit the PHP code. Let me know if you’d want to go into that territory?

    Thank you!

    Thread Starter quasiDigi

    (@quasidigi)

    Hi @hardeepasrani

    Yes please, I am more than happy that you take me in a journey behind the scenes of your plugin ^_^.

    Will I this method also work for future versions?

    And just to be sure I got it well: this will only disable the generation of the custom style sheet of the element, correct?

    Thank you!

    Thread Starter quasiDigi

    (@quasidigi)

    hi @hardeepasrani

    Could you please provide me with the code to disable the custom styles?

    Thank you!

    Plugin Author Hardeep Asrani

    (@hardeepasrani)

    Hey @quasidigi,

    Sorry for the delay. I was out on a small vacation. You can edit the otter-blocks/vendor/codeinwp/gutenberg-blocks/inc/class-base-css.php file. In the autoload_block_classes function, you can remove the name of blocks that you want to stop from outputting custom CSS.

    Advanced_Column_CSS & Advanced_Columns_CSS are the ones for Section block.

    Again, sorry for the delay. Hope it helps.

    Thread Starter quasiDigi

    (@quasidigi)

    Hi @hardeepasrani

    I hope you enjoyed you’re days off 🙂

    Thank you for your answer!

    • This reply was modified 1 month ago by quasiDigi.
    Plugin Author Hardeep Asrani

    (@hardeepasrani)

    You’re welcome!

    Thread Starter quasiDigi

    (@quasidigi)

    Hi @hardeepasrani

    One last question: I assume those changes I make in the plugin will be overwritten on my next update. I can’t find a way to make a “child” plugin. Could you please point me to some article explaining how to do it, if you know of one, of course.

    Plugin Author Hardeep Asrani

    (@hardeepasrani)

    Hey @quasidigi,

    Unfortunately, it’s not possible to make a child plugin. 🙁

    The best we can do is to add a filter in the plugin to stop it from putting any custom CSS, even that will omit the default CSS file of the section.

    Let me know if you think that can be helpful.

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