-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
CSS StylingRelated to editor and front end styles, CSS-specific issues.Related to editor and front end styles, CSS-specific issues.[Feature] BlocksOverall functionality of blocksOverall functionality of blocks[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
See full report at #38712 (comment)
For themes that have should_load_separate_block_assets enabled, the styles for blocks are loaded as separate embedded stylesheets. The expected content of every stylesheet is the contents of the style.css of the block and, optionally, if the theme opts-in, the theme.css as well.
However, when Gutenberg is active, the block stylesheet has more contents than expected.
Step-by-step reproduction instructions
- Use WordPress 5.9.X with the Gutenberg plugin active.
- Use a block theme (by default they have
should_load_separate_block_assetsenabled). - Go to the front-end and inspect the
wp-block-group-inline-css. It contains:
.wp-block-group {
box-sizing: border-box;
}
:where(.wp-block-group.has-background) {
padding: 1.25em 2.375em;
}
.wp-block-group:where(.has-background) {
padding: 1.25em 2.375em;
}However, when Gutenberg is not enabled it instead outputs:
.wp-block-group {
box-sizing: border-box;
}
.wp-block-group:where(.has-background) {
padding: 1.25em 2.375em;
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
CSS StylingRelated to editor and front end styles, CSS-specific issues.Related to editor and front end styles, CSS-specific issues.[Feature] BlocksOverall functionality of blocksOverall functionality of blocks[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended