From 9dcb04e4c2c12904cc8dc45063b7487fd9c6aec6 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Fri, 2 Dec 2022 09:36:54 +1300 Subject: [PATCH 1/5] Add a css style to theme.json to allow setting of custom css strings --- schemas/json/theme.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/schemas/json/theme.json b/schemas/json/theme.json index d42706bec8df96..6a3b5a759d087e 100644 --- a/schemas/json/theme.json +++ b/schemas/json/theme.json @@ -1169,6 +1169,10 @@ } }, "additionalProperties": false + }, + "css": { + "description": "Sets custom CSS.", + "type": "string" } } }, @@ -1186,7 +1190,8 @@ "typography": {}, "filter": {}, "shadow": {}, - "outline": {} + "outline": {}, + "css": {} }, "additionalProperties": false } @@ -1629,6 +1634,7 @@ "filter": {}, "shadow": {}, "outline": {}, + "css": {}, "elements": { "description": "Styles defined on a per-element basis using the element's selector.", "$ref": "#/definitions/stylesElementsPropertiesComplete" From eaff0670a33390b5ac16a4d00f09e928c38f23d0 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Fri, 2 Dec 2022 10:59:48 +1300 Subject: [PATCH 2/5] add css to additional properties --- schemas/json/theme.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/schemas/json/theme.json b/schemas/json/theme.json index 6a3b5a759d087e..967f072e1ecbaf 100644 --- a/schemas/json/theme.json +++ b/schemas/json/theme.json @@ -1215,6 +1215,7 @@ "outline": {}, "spacing": {}, "typography": {}, + "css": {}, ":hover": { "$ref": "#/definitions/stylesPropertiesComplete" }, @@ -1566,6 +1567,7 @@ "filter": {}, "shadow": {}, "outline": {}, + "css": {}, "elements": { "$ref": "#/definitions/stylesElementsPropertiesComplete" } From 01ef4eb63715b140aed8b54395de335815e0bca9 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Fri, 2 Dec 2022 12:04:11 +1300 Subject: [PATCH 3/5] Update docs --- .../theme-json-reference/theme-json-living.md | 7 +++++++ 1 file changed, 7 insertions(+) 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 cf7624766c9ff3..aa3f677bdb1481 100644 --- a/docs/reference-guides/theme-json-reference/theme-json-living.md +++ b/docs/reference-guides/theme-json-reference/theme-json-living.md @@ -225,6 +225,13 @@ Outline styles. | style | string | | | width | string | | +--- + +### css + +Sets custom CSS. + + --- From 4dbb200eb2161ee99e371ef75ff2f652090b8865 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Fri, 2 Dec 2022 14:24:45 +1300 Subject: [PATCH 4/5] improve description --- schemas/json/theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/json/theme.json b/schemas/json/theme.json index 967f072e1ecbaf..1a8aa67b0967b1 100644 --- a/schemas/json/theme.json +++ b/schemas/json/theme.json @@ -1171,7 +1171,7 @@ "additionalProperties": false }, "css": { - "description": "Sets custom CSS.", + "description": "Sets custom CSS to apply styling not covered by other theme.json properties.", "type": "string" } } From 110fcb8181acd3a36826cce538a7a073b4c10c08 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Fri, 2 Dec 2022 14:25:54 +1300 Subject: [PATCH 5/5] Update docs --- docs/reference-guides/theme-json-reference/theme-json-living.md | 2 +- 1 file changed, 1 insertion(+), 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 aa3f677bdb1481..a694cf63e909fa 100644 --- a/docs/reference-guides/theme-json-reference/theme-json-living.md +++ b/docs/reference-guides/theme-json-reference/theme-json-living.md @@ -229,7 +229,7 @@ Outline styles. ### css -Sets custom CSS. +Sets custom CSS to apply styling not covered by other theme.json properties. ---