From 36b94aa3f5450088ccec98dbd1d2cb2e1e86454c Mon Sep 17 00:00:00 2001 From: MaggieCabrera Date: Thu, 26 May 2022 12:39:01 +0200 Subject: [PATCH 1/3] added button element to theme.json --- blockbase/theme.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/blockbase/theme.json b/blockbase/theme.json index 520fe57566..bf8fb7f258 100644 --- a/blockbase/theme.json +++ b/blockbase/theme.json @@ -541,6 +541,21 @@ "text": "var(--wp--custom--color--foreground)" }, "elements": { + "button": { + "border": { + "radius": "var(--wp--custom--button--border--radius)" + }, + "color": { + "background": "var(--wp--custom--button--color--background)", + "text": "var(--wp--custom--button--color--text)" + }, + "typography": { + "fontFamily": "var(--wp--preset--font-family--body-font)", + "fontSize": "var(--wp--custom--button--typography--font-size)", + "fontWeight": "var(--wp--custom--button--typography--font-weight)", + "lineHeight": "var(--wp--custom--button--typography--line-height)" + } + }, "h1": { "typography": { "fontFamily": "var(--wp--preset--font-family--heading-font)", From 3b793d40139a6135e14f4a4aa61f49ee3f603285 Mon Sep 17 00:00:00 2001 From: MaggieCabrera Date: Thu, 26 May 2022 12:44:43 +0200 Subject: [PATCH 2/3] test decoration for button --- blockbase/theme.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/blockbase/theme.json b/blockbase/theme.json index bf8fb7f258..f38d4762b8 100644 --- a/blockbase/theme.json +++ b/blockbase/theme.json @@ -553,7 +553,8 @@ "fontFamily": "var(--wp--preset--font-family--body-font)", "fontSize": "var(--wp--custom--button--typography--font-size)", "fontWeight": "var(--wp--custom--button--typography--font-weight)", - "lineHeight": "var(--wp--custom--button--typography--line-height)" + "lineHeight": "var(--wp--custom--button--typography--line-height)", + "textDecoration": "none" } }, "h1": { From 0c7237b94901e884bcb153aef5a1ad17a1cb38c4 Mon Sep 17 00:00:00 2001 From: MaggieCabrera Date: Thu, 26 May 2022 13:24:40 +0200 Subject: [PATCH 3/3] added padding rules --- blockbase/theme.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/blockbase/theme.json b/blockbase/theme.json index f38d4762b8..7d6a622426 100644 --- a/blockbase/theme.json +++ b/blockbase/theme.json @@ -555,6 +555,14 @@ "fontWeight": "var(--wp--custom--button--typography--font-weight)", "lineHeight": "var(--wp--custom--button--typography--line-height)", "textDecoration": "none" + }, + "spacing": { + "padding": { + "top": "calc( var(--wp--custom--button--spacing--padding--top) + var(--wp--custom--button--border--width) )", + "bottom": "calc( var(--wp--custom--button--spacing--padding--bottom) + var(--wp--custom--button--border--width) )", + "left": "calc( var(--wp--custom--button--spacing--padding--left) + var(--wp--custom--button--border--width) )", + "right": "calc( var(--wp--custom--button--spacing--padding--right) + var(--wp--custom--button--border--width) )" + } } }, "h1": {