From dd0a4318e6ebc455c4d902af6197885c765a37a3 Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Thu, 9 Mar 2023 14:54:18 +1100 Subject: [PATCH 1/3] Theme JSON schema: Add sticky position to settings --- schemas/json/theme.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/schemas/json/theme.json b/schemas/json/theme.json index 39c4b3ac902000..9e81ea4b279c9e 100644 --- a/schemas/json/theme.json +++ b/schemas/json/theme.json @@ -267,6 +267,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": { @@ -627,6 +644,7 @@ { "$ref": "#/definitions/settingsPropertiesColor" }, { "$ref": "#/definitions/settingsPropertiesShadow" }, { "$ref": "#/definitions/settingsPropertiesLayout" }, + { "$ref": "#/definitions/settingsPropertiesPosition" }, { "$ref": "#/definitions/settingsPropertiesSpacing" }, { "$ref": "#/definitions/settingsPropertiesTypography" }, { "$ref": "#/definitions/settingsPropertiesCustom" } @@ -645,6 +663,7 @@ "shadow": {}, "color": {}, "layout": {}, + "position": {}, "spacing": {}, "typography": {}, "custom": {} From 1fc9c3a3ba65e6afa09c5b2c17a3812a286ca94a Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Thu, 9 Mar 2023 15:12:14 +1100 Subject: [PATCH 2/3] Add dimensions.minHeight to styles --- .../theme-json-reference/theme-json-living.md | 20 ++++++++++++++++ schemas/json/theme.json | 23 ++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/docs/reference-guides/theme-json-reference/theme-json-living.md b/docs/reference-guides/theme-json-reference/theme-json-living.md index c8a59c5e10f0c0..c7bb892103e004 100644 --- a/docs/reference-guides/theme-json-reference/theme-json-living.md +++ b/docs/reference-guides/theme-json-reference/theme-json-living.md @@ -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. @@ -181,6 +191,16 @@ Color styles. --- +### dimensions + +Dimensions styles + +| Property | Type | Props | +| --- | --- |--- | +| minHeight | string, object | | + +--- + ### spacing Spacing styles. diff --git a/schemas/json/theme.json b/schemas/json/theme.json index 9e81ea4b279c9e..16a6c60fa9b2bc 100644 --- a/schemas/json/theme.json +++ b/schemas/json/theme.json @@ -642,6 +642,7 @@ { "$ref": "#/definitions/settingsPropertiesAppearanceTools" }, { "$ref": "#/definitions/settingsPropertiesBorder" }, { "$ref": "#/definitions/settingsPropertiesColor" }, + { "$ref": "#/definitions/settingsPropertiesDimensions" }, { "$ref": "#/definitions/settingsPropertiesShadow" }, { "$ref": "#/definitions/settingsPropertiesLayout" }, { "$ref": "#/definitions/settingsPropertiesPosition" }, @@ -660,10 +661,11 @@ "properties": { "appearanceTools": {}, "border": {}, - "shadow": {}, "color": {}, + "dimensions": {}, "layout": {}, "position": {}, + "shadow": {}, "spacing": {}, "typography": {}, "custom": {} @@ -1277,6 +1279,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", @@ -1592,6 +1611,7 @@ "properties": { "border": {}, "color": {}, + "dimensions": {}, "spacing": {}, "typography": {}, "filter": {}, @@ -1968,6 +1988,7 @@ "properties": { "border": {}, "color": {}, + "dimensions": {}, "spacing": {}, "typography": {}, "filter": {}, From a6c8eeade4984de8a6eabcf0fba9fea47f054673 Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Thu, 9 Mar 2023 15:34:06 +1100 Subject: [PATCH 3/3] Add missing type: objects line --- schemas/json/theme.json | 1 + 1 file changed, 1 insertion(+) diff --git a/schemas/json/theme.json b/schemas/json/theme.json index 16a6c60fa9b2bc..0458e587a909f2 100644 --- a/schemas/json/theme.json +++ b/schemas/json/theme.json @@ -232,6 +232,7 @@ } }, "settingsPropertiesDimensions": { + "type": "object", "properties": { "dimensions": { "description": "Settings related to dimensions.",