What CSS rules are introduced to core blocks through wp-block-styles?

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.

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 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


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x