Editor: Backport foundation for Layout block support refactor (part 1).

This change backports the following changes from Gutenberg repository:

- [WordPress/gutenberg#40875 gutenberg#40875] Layout: Use semantic classnames, centralize layout definitions, reduce duplication, and fix blockGap in theme.json
- [WordPress/gutenberg#42544 gutenberg#42544] Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles gutenberg#42544
- [WordPress/gutenberg#42087 gutenberg#42087] Theme.json: Add block support feature level selectors for blocks gutenberg#42087
- [WordPress/gutenberg#43792 gutenberg#43792] Global Styles: Split root layout rules into a different function gutenberg#43792
- [WordPress/gutenberg#42544 gutenberg#42544] Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles gutenberg#42544
- [WordPress/gutenberg#42665 gutenberg#42665] Layout: Reduce specificity of fallback blockGap styles gutenberg#42665
- [WordPress/gutenberg#42085 gutenberg#42085] Core CSS support for root padding and alignfull blocks gutenberg#42085

Note that it doesn't entirely port over PR40875 — the remaining PHP changes for that PR will be explored in a separate PR targeting `layout.php`.

Props andrewserong, aaronrobertshaw, isabel_brison.
See #56467.


git-svn-id: https://develop.svn.wordpress.org/trunk@54159 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jb Audras
2022-09-14 14:19:16 +00:00
parent 7c86dfee68
commit 34aeac1db2
9 changed files with 1165 additions and 90 deletions

View File

@@ -396,6 +396,7 @@ class WP_Test_REST_Themes_Controller extends WP_Test_REST_Controller_Testcase {
$this->assertArrayHasKey( 'dark-editor-style', $theme_supports );
$this->assertArrayHasKey( 'disable-custom-font-sizes', $theme_supports );
$this->assertArrayHasKey( 'disable-custom-gradients', $theme_supports );
$this->assertArrayHasKey( 'disable-layout-styles', $theme_supports );
$this->assertArrayHasKey( 'editor-color-palette', $theme_supports );
$this->assertArrayHasKey( 'editor-font-sizes', $theme_supports );
$this->assertArrayHasKey( 'editor-gradient-presets', $theme_supports );
@@ -406,7 +407,7 @@ class WP_Test_REST_Themes_Controller extends WP_Test_REST_Controller_Testcase {
$this->assertArrayHasKey( 'responsive-embeds', $theme_supports );
$this->assertArrayHasKey( 'title-tag', $theme_supports );
$this->assertArrayHasKey( 'wp-block-styles', $theme_supports );
$this->assertCount( 21, $theme_supports );
$this->assertCount( 22, $theme_supports );
}
/**