mirrored from git://develop.git.wordpress.org/
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Block Themes: Add section styling via extended block style variations
Provide users with the ability to style entire sections of a page without having to tediously reapply the same sets of styles. This is done by extending block style variations to apply to nested blocks. See WordPress/gutenberg#57908. Fixes #61312. Props aaronrobertshaw, talldanwp, ramonopoly, isabel_brison, andrewserong. git-svn-id: https://develop.svn.wordpress.org/trunk@58264 602fd350-edb4-49c9-b593-d223f7449a82
- Loading branch information
1 parent
103856d
commit f91931a
Showing
14 changed files
with
920 additions
and
70 deletions.
There are no files selected for viewing
424 changes: 424 additions & 0 deletions
424
src/wp-includes/block-supports/block-style-variations.php
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
tests/phpunit/data/themedir1/block-theme-child-with-block-style-variations/style.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
Theme Name: Block Theme Child With Block Style Variations Theme | ||
Theme URI: https://wordpress.org/ | ||
Description: For testing purposes only. | ||
Template: block-theme | ||
Version: 1.0.0 | ||
Text Domain: block-theme-child-with-block-style-variations | ||
*/ |
10 changes: 10 additions & 0 deletions
10
...emedir1/block-theme-child-with-block-style-variations/styles/block-style-variation-a.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"version": 3, | ||
"blockTypes": [ "core/group", "core/columns", "core/media-text" ], | ||
"styles": { | ||
"color": { | ||
"background": "darkcyan", | ||
"text": "aliceblue" | ||
} | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
tests/phpunit/data/themedir1/block-theme-child-with-block-style-variations/theme.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"$schema": "https://schemas.wp.org/trunk/theme.json", | ||
"version": 3 | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/phpunit/data/themedir1/block-theme/styles/block-style-variation-a.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"version": 3, | ||
"blockTypes": [ "core/group", "core/columns" ], | ||
"styles": { | ||
"color": { | ||
"background": "indigo", | ||
"text": "plum" | ||
} | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/phpunit/data/themedir1/block-theme/styles/block-style-variation-b.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"version": 3, | ||
"blockTypes": [ "core/group", "core/columns" ], | ||
"styles": { | ||
"color": { | ||
"background": "midnightblue", | ||
"text": "lightblue" | ||
} | ||
} | ||
} |
Oops, something went wrong.