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 (#48948)

* Theme JSON schema: Add sticky position to settings

* Add dimensions.minHeight to styles

* Add missing type: objects line
andrewserong authored and Mamaduka committed Mar 14, 2023

Verified

This commit was signed with the committer’s verified signature.
jdaugherty James Daugherty
1 parent c1d64c0 commit 33001e5
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
@@ -105,6 +105,16 @@ Settings related to layout.

---

### position

Settings related to position.

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

---

### spacing

Settings related to spacing.
@@ -179,6 +189,16 @@ Color styles.

---

### dimensions

Dimensions styles

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

---

### spacing

Spacing styles.
43 changes: 42 additions & 1 deletion schemas/json/theme.json
Original file line number Diff line number Diff line change
@@ -232,6 +232,7 @@
}
},
"settingsPropertiesDimensions": {
"type": "object",
"properties": {
"dimensions": {
"description": "Settings related to dimensions.",
@@ -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": {
@@ -620,8 +638,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" }
@@ -637,9 +657,11 @@
"properties": {
"appearanceTools": {},
"border": {},
"shadow": {},
"color": {},
"dimensions": {},
"layout": {},
"position": {},
"shadow": {},
"spacing": {},
"typography": {},
"custom": {}
@@ -1253,6 +1275,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",
@@ -1564,6 +1603,7 @@
"properties": {
"border": {},
"color": {},
"dimensions": {},
"spacing": {},
"typography": {},
"filter": {},
@@ -1940,6 +1980,7 @@
"properties": {
"border": {},
"color": {},
"dimensions": {},
"spacing": {},
"typography": {},
"filter": {},

0 comments on commit 33001e5

Please sign in to comment.