最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin0浏览0评论

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

发布评论

评论列表(0)

  1. 暂无评论