• Hi,

    Gutenberg as editor have the role to create content for page using block as new feature, but why it should be conflicting with any other framework which is for the design purpose? For example the default css provided by gutenberg conflict with bootstrap css.

    Let see an example for button. Gutenberg provide button block with default class “wp-block-button” and “wp-block-button__link”, it provide some default css styles with it, so when we add our bootstrap css classes like btn btn-primary etc, to the button it distort the look of button. see the page https://uniquesweb.co.in/unitest/why-conflict/

    Its ok that you provide some styles for some particular blocks, but isn’t it important to allow controlling styles by the user itself? you can provide disable default styles for all such blocks comes with gutenberg, so that anyone can add his own fresh style based on class or otherway.

    In current scenario, I am disabling default css of gutenberg using
    wp_dequeue_style( 'wp-block-library' );
    and then using my button classes, or otherwise I have to create my own button block with my own html structure with my class values.

    In first case we are loosing the style support as whole for all default gutenberg editor, this will also effect other plugins too whose blocks depends on gutenberg styles.
    In second case we are forcing to use two blocks for the same purpose, button for gutenberg and button for bootstrap.

    so if we provide just a checkbox like “disable gutenberg default styles” that removes the classes added default to the button or any other such block, it solve the problem straight forward, and anyway we can utilize inline styling like background color, text color etc.

    So in summary default styles shouldn’t be forced to use by user.

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

Viewing 1 replies (of 1 total)
  • Hi, I’m sure that nobody intentionally wants to conflict, it’s just that it’s impossible to be compatible with everything. If Gutenberg didn’t output any default styles, it seems like that’d be even worse, since things would look even worse in the majority of situations.

    Dequeueing wp-block-library sounds like a good solution for your case.

    Another idea would be to have some extra styles that resolve that conflicts between Bootstrap and Gutenberg, and include that as part of your Bootstrap distribution. That’d be a great project to share with other developers, since it’d be useful for a lot of people.

Viewing 1 replies (of 1 total)
  • The topic ‘Why editor should have conflict with any framework like bootstrap?’ is closed to new replies.