admin管理员组

文章数量:1326345

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.

Share Improve this question asked Aug 10, 2020 at 19:43 WillWill 7617 silver badges24 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

If 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

本文标签: What CSS rules are introduced to core blocks through wpblockstyles