4

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 1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.