The Gutenberg Handbook mentions that some CSS for WordPress core blocks are applied to the front-end and within the editor by default (and that they cannot be disabled) but there are more opinionated CSS styles available that can be optionally added by adding the following your theme (in one of the PHP files, typically done through functions.php).
add_theme_support( 'wp-block-styles' );
I'm trying to find a list of these CSS rules added by wp-block-styles
I've searched through the Gutenberg repo and the only contents of wp-block-styles
are the documentation that I linked to above.
The Gutenberg Handbook mentions that some CSS for WordPress core blocks are applied to the front-end and within the editor by default (and that they cannot be disabled) but there are more opinionated CSS styles available that can be optionally added by adding the following your theme (in one of the PHP files, typically done through functions.php).
add_theme_support( 'wp-block-styles' );
I'm trying to find a list of these CSS rules added by wp-block-styles
I've searched through the Gutenberg repo and the only contents of wp-block-styles
are the documentation that I linked to above.
1 Answer
Reset to default 1If you have the Gutenberg plugin installed and enabled, the css rules are loaded in
/plugins/gutenberg/build/block-library/theme.css
;
If you're just using the block-editor that is in core WordPress, the rules will instead be loaded from:
wp-includes/css/dist/block-library/theme.css