Skip to content

Commit

Permalink
Add support for border configuration to theme (#28049)
Browse files Browse the repository at this point in the history
With this change a block can be configured to allow a theme to define
border color, width and style in addition to the already available
radius.
  • Loading branch information
pbking committed Jan 28, 2021
1 parent ccc1e86 commit 742ae83
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/class-wp-theme-json.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ class WP_Theme_JSON {
'styles' => array(
'border' => array(
'radius' => null,
'color' => null,
'style' => null,
'width' => null,
),
'color' => array(
'background' => null,
Expand Down Expand Up @@ -119,6 +122,9 @@ class WP_Theme_JSON {
'settings' => array(
'border' => array(
'customRadius' => null,
'customColor' => null,
'customStyle' => null,
'customWidth' => null,
),
'color' => array(
'custom' => null,
Expand Down Expand Up @@ -250,6 +256,18 @@ class WP_Theme_JSON {
'value' => array( 'border', 'radius' ),
'support' => array( '__experimentalBorder', 'radius' ),
),
'borderColor' => array(
'value' => array( 'border', 'color' ),
'support' => array( '__experimentalBorder', 'color' ),
),
'borderWidth' => array(
'value' => array( 'border', 'width' ),
'support' => array( '__experimentalBorder', 'width' ),
),
'borderStyle' => array(
'value' => array( 'border', 'style' ),
'support' => array( '__experimentalBorder', 'style' ),
),
'color' => array(
'value' => array( 'color', 'text' ),
'support' => array( 'color' ),
Expand Down

0 comments on commit 742ae83

Please sign in to comment.