Skip to content

Commit

Permalink
Schema: Fix appearanceTools in theme.json schema (#37762)
Browse files Browse the repository at this point in the history
  • Loading branch information
Petter Walbø Johnsgård authored Jan 7, 2022
1 parent a22815b commit 1768e8e
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions schemas/json/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@
"createTheme": "https://developer.wordpress.org/block-editor/how-to-guides/themes/create-block-theme/",
"reference": "https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/"
},
"settingsPropertiesBorder": {
"settingsPropertiesAppearanceTools": {
"properties": {
"appearanceTools": {
"description": "Setting that enables the following UI tools:\n\n- border: color, radius, style, width\n- color: link\n- spacing: blockGap, margin, padding\n- typography: lineHeight",
"type": "boolean",
"default": false
},
}
}
},
"settingsPropertiesBorder": {
"properties": {
"border": {
"description": "Settings related to borders.",
"type": "object",
Expand Down Expand Up @@ -165,7 +169,6 @@
},
"additionalProperties": false
}

}
},
"settingsPropertiesLayout": {
Expand All @@ -187,8 +190,7 @@
}
}
},

"settingsPropertiesSpacing":{
"settingsPropertiesSpacing": {
"properties": {
"spacing": {
"description": "Settings related to spacing.",
Expand Down Expand Up @@ -225,7 +227,7 @@
}
}
},
"settingsPropertiesTypography":{
"settingsPropertiesTypography": {
"properties": {
"typography": {
"description": "Settings related to typography.",
Expand Down Expand Up @@ -329,7 +331,8 @@
}
},
"settingsProperties": {
"allOf":[
"allOf": [
{ "$ref": "#/definitions/settingsPropertiesAppearanceTools" },
{ "$ref": "#/definitions/settingsPropertiesBorder" },
{ "$ref": "#/definitions/settingsPropertiesColor" },
{ "$ref": "#/definitions/settingsPropertiesLayout" },
Expand All @@ -346,6 +349,7 @@
},
{
"properties": {
"appearanceTools": {},
"border": {},
"color": {},
"layout": {},
Expand All @@ -370,7 +374,10 @@
"$ref": "#/definitions/settingsPropertiesComplete"
},
"core/button": {
"allOf":[
"allOf": [
{
"$ref": "#/definitions/settingsPropertiesAppearanceTools"
},
{
"properties": {
"border": {
Expand All @@ -389,7 +396,9 @@
{ "$ref": "#/definitions/settingsPropertiesColor" },
{ "$ref": "#/definitions/settingsPropertiesLayout" },
{ "$ref": "#/definitions/settingsPropertiesSpacing" },
{ "$ref": "#/definitions/settingsPropertiesTypography" },
{
"$ref": "#/definitions/settingsPropertiesTypography"
},
{ "$ref": "#/definitions/settingsPropertiesCustom" }
]
},
Expand Down Expand Up @@ -1141,6 +1150,7 @@
},
{
"properties": {
"appearanceTools": {},
"color": {},
"layout": {},
"spacing": {},
Expand Down

0 comments on commit 1768e8e

Please sign in to comment.