Automattic / blocks-everywhere

Gutenberg block editor in WordPress comments, admin pages, bbPress, and BuddyPress.
GNU General Public License v3.0
77 stars 17 forks source link

Styles: allow opting out of styles #194

Closed arcangelini closed 10 months ago

arcangelini commented 10 months ago

Summary

Since Gutenberg is being loaded on the front end there are many collisions with styling from themes. This is not limited to the editor getting styled by the theme, the use of wp_styles()->done = array( 'wp-reset-editor-styles' ); is resetting some of the styles on the theme.

To avoid this I would like to make loading the styles optional to allow us to load the necessary core stylesheets nested within our plugins styles.

        @include meta.load-css('@wordpress/components/build-style/style-rtl.css');
        @include meta.load-css('@wordpress/format-library/build-style/style-rtl.css');
        @include meta.load-css('@wordpress/edit-post/build-style/style-rtl.css');

This is tested and working in the following https://github.com/Automattic/verbum/pull/13.