Skip to content

Commit

Permalink
Theme JSON schema: Add sticky position to settings, minHeight to styl…
Browse files Browse the repository at this point in the history
…es (WordPress#48948)

* Theme JSON schema: Add sticky position to settings

* Add dimensions.minHeight to styles

* Add missing type: objects line
  • Loading branch information
andrewserong authored Mar 9, 2023
1 parent e6511a3 commit 564b6d5
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 1 deletion.
20 changes: 20 additions & 0 deletions docs/reference-guides/theme-json-reference/theme-json-living.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@ Settings related to layout.

---

### position

Settings related to position.

| Property | Type | Default | Props |
| --- | --- | --- |--- |
| sticky | boolean | false | |

---

### spacing

Settings related to spacing.
Expand Down Expand Up @@ -181,6 +191,16 @@ Color styles.

---

### dimensions

Dimensions styles

| Property | Type | Props |
| --- | --- |--- |
| minHeight | string, object | |

---

### spacing

Spacing styles.
Expand Down
43 changes: 42 additions & 1 deletion schemas/json/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
}
},
"settingsPropertiesDimensions": {
"type": "object",
"properties": {
"dimensions": {
"description": "Settings related to dimensions.",
Expand Down Expand Up @@ -267,6 +268,23 @@
}
}
},
"settingsPropertiesPosition": {
"type": "object",
"properties": {
"position": {
"description": "Settings related to position.",
"type": "object",
"properties": {
"sticky": {
"description": "Allow users to set sticky position.",
"type": "boolean",
"default": false
}
},
"additionalProperties": false
}
}
},
"settingsPropertiesSpacing": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -625,8 +643,10 @@
{ "$ref": "#/definitions/settingsPropertiesAppearanceTools" },
{ "$ref": "#/definitions/settingsPropertiesBorder" },
{ "$ref": "#/definitions/settingsPropertiesColor" },
{ "$ref": "#/definitions/settingsPropertiesDimensions" },
{ "$ref": "#/definitions/settingsPropertiesShadow" },
{ "$ref": "#/definitions/settingsPropertiesLayout" },
{ "$ref": "#/definitions/settingsPropertiesPosition" },
{ "$ref": "#/definitions/settingsPropertiesSpacing" },
{ "$ref": "#/definitions/settingsPropertiesTypography" },
{ "$ref": "#/definitions/settingsPropertiesCustom" }
Expand All @@ -642,9 +662,11 @@
"properties": {
"appearanceTools": {},
"border": {},
"shadow": {},
"color": {},
"dimensions": {},
"layout": {},
"position": {},
"shadow": {},
"spacing": {},
"typography": {},
"custom": {}
Expand Down Expand Up @@ -1258,6 +1280,23 @@
},
"additionalProperties": false
},
"dimensions": {
"description": "Dimensions styles",
"type": "object",
"properties": {
"minHeight": {
"description": "Sets the `min-height` CSS property.",
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/definitions/refComplete"
}
]
}
}
},
"spacing": {
"description": "Spacing styles.",
"type": "object",
Expand Down Expand Up @@ -1573,6 +1612,7 @@
"properties": {
"border": {},
"color": {},
"dimensions": {},
"spacing": {},
"typography": {},
"filter": {},
Expand Down Expand Up @@ -1949,6 +1989,7 @@
"properties": {
"border": {},
"color": {},
"dimensions": {},
"spacing": {},
"typography": {},
"filter": {},
Expand Down

0 comments on commit 564b6d5

Please sign in to comment.