From e9c97fe32a31d0524afb64aee896ab3d80428a94 Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Tue, 12 Apr 2022 13:38:48 +0100 Subject: [PATCH 1/8] Archeo: Try using button as an element --- archeo/style.css | 2 -- archeo/theme.json | 28 ++++++++++++++-------------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/archeo/style.css b/archeo/style.css index 4798252459..e72f4251f4 100644 --- a/archeo/style.css +++ b/archeo/style.css @@ -77,7 +77,6 @@ a:active, * https://github.com/WordPress/gutenberg/issues/27075 */ -.wp-block-search__button:hover, .wp-block-file .wp-block-file__button:hover, .wp-block-button__link:hover { background-color: var(--wp--preset--color--primary); @@ -90,7 +89,6 @@ a:active, * https://github.com/WordPress/gutenberg/issues/27760 */ -.wp-block-search__button, .wp-block-file .wp-block-file__button { background-color: var(--wp--preset--color--foreground); border-radius: 0; diff --git a/archeo/theme.json b/archeo/theme.json index f884c82b0b..3283ea75f8 100644 --- a/archeo/theme.json +++ b/archeo/theme.json @@ -155,20 +155,6 @@ }, "styles": { "blocks": { - "core/button": { - "border": { - "radius": "0" - }, - "color": { - "background": "var(--wp--preset--color--foreground)", - "text": "var(--wp--preset--color--background)" - }, - "typography": { - "fontFamily": "var(--wp--preset--font-family--chivo)", - "fontSize": "var(--wp--preset--typography--font-size--normal)", - "textTransform": "uppercase" - } - }, "core/heading": { "typography": { "fontWeight": "100", @@ -276,6 +262,20 @@ "typography": { "fontSize": "var(--wp--preset--font-size--small)" } + }, + "button": { + "border": { + "radius": "0" + }, + "color": { + "background": "var(--wp--preset--color--foreground)", + "text": "var(--wp--preset--color--background)" + }, + "typography": { + "fontFamily": "var(--wp--preset--font-family--chivo)", + "fontSize": "var(--wp--preset--typography--font-size--normal)", + "textTransform": "uppercase" + } } }, "spacing": { From c24e80c813bd445ae5edde7524c8b693ffddeedd Mon Sep 17 00:00:00 2001 From: MaggieCabrera Date: Thu, 26 May 2022 09:35:18 +0200 Subject: [PATCH 2/8] remove uppercase rule from button element --- archeo/theme.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/archeo/theme.json b/archeo/theme.json index 3283ea75f8..aeeb049c31 100644 --- a/archeo/theme.json +++ b/archeo/theme.json @@ -155,6 +155,11 @@ }, "styles": { "blocks": { + "core/button": { + "typography": { + "textTransform": "uppercase" + } + }, "core/heading": { "typography": { "fontWeight": "100", @@ -273,8 +278,7 @@ }, "typography": { "fontFamily": "var(--wp--preset--font-family--chivo)", - "fontSize": "var(--wp--preset--typography--font-size--normal)", - "textTransform": "uppercase" + "fontSize": "var(--wp--preset--typography--font-size--normal)" } } }, From b7b941cea75d7c9a5b23a38642c931f7b801d10f Mon Sep 17 00:00:00 2001 From: MaggieCabrera Date: Thu, 26 May 2022 09:37:25 +0200 Subject: [PATCH 3/8] added padding to search block button --- archeo/style.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/archeo/style.css b/archeo/style.css index e72f4251f4..f638f1cee1 100644 --- a/archeo/style.css +++ b/archeo/style.css @@ -98,6 +98,10 @@ a:active, padding: calc(0.667em + 2px) calc(1.333em + 2px); } +.wp-block-search__button { + padding: calc(0.667em + 2px) calc(1.333em + 2px); +} + /* * Comment Form Fields */ From 4f26820914f920493ac587c244a7b29639849cce Mon Sep 17 00:00:00 2001 From: MaggieCabrera Date: Thu, 26 May 2022 09:39:15 +0200 Subject: [PATCH 4/8] corrected variable name --- archeo/theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archeo/theme.json b/archeo/theme.json index aeeb049c31..a4c1c61123 100644 --- a/archeo/theme.json +++ b/archeo/theme.json @@ -278,7 +278,7 @@ }, "typography": { "fontFamily": "var(--wp--preset--font-family--chivo)", - "fontSize": "var(--wp--preset--typography--font-size--normal)" + "fontSize": "var(--wp--preset--font-size--normal)" } } }, From b252dbb1371eb1dc038dbaf25e070a1718be0bc1 Mon Sep 17 00:00:00 2001 From: MaggieCabrera Date: Thu, 26 May 2022 09:42:57 +0200 Subject: [PATCH 5/8] moved padding rules to button element --- archeo/style.css | 4 ---- archeo/theme.json | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/archeo/style.css b/archeo/style.css index f638f1cee1..e72f4251f4 100644 --- a/archeo/style.css +++ b/archeo/style.css @@ -98,10 +98,6 @@ a:active, padding: calc(0.667em + 2px) calc(1.333em + 2px); } -.wp-block-search__button { - padding: calc(0.667em + 2px) calc(1.333em + 2px); -} - /* * Comment Form Fields */ diff --git a/archeo/theme.json b/archeo/theme.json index a4c1c61123..6a251c6a88 100644 --- a/archeo/theme.json +++ b/archeo/theme.json @@ -279,6 +279,14 @@ "typography": { "fontFamily": "var(--wp--preset--font-family--chivo)", "fontSize": "var(--wp--preset--font-size--normal)" + }, + "spacing": { + "padding": { + "top": "calc(0.667em + 2px)", + "bottom": "calc(0.667em + 2px)", + "left": "calc(1.333em + 2px)", + "right": "calc(1.333em + 2px)" + } } } }, From a626d0b916429d2a2bfcd23ca3c28a6dc79c2fb8 Mon Sep 17 00:00:00 2001 From: MaggieCabrera Date: Thu, 26 May 2022 09:48:07 +0200 Subject: [PATCH 6/8] typos, outline button padding --- archeo/style.css | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/archeo/style.css b/archeo/style.css index e72f4251f4..ccacf50e10 100644 --- a/archeo/style.css +++ b/archeo/style.css @@ -83,9 +83,8 @@ a:active, } /* - * Search and File Block button styles. + * File Block button styles. * Necessary until the following issues are resolved in Gutenberg: - * https://github.com/WordPress/gutenberg/issues/36444 * https://github.com/WordPress/gutenberg/issues/27760 */ @@ -94,10 +93,20 @@ a:active, border-radius: 0; border: none; color: var(--wp--preset--color--background); - font-size: var(--wp--preset--typography--font-size--normal); + font-size: var(--wp--preset--font-size--normal); padding: calc(0.667em + 2px) calc(1.333em + 2px); } +/* + * Outline block button needs a padding tweak so it's the same size of normal buttons + */ +.is-style-outline > :where(.wp-block-button__link), +:where(.wp-block-button__link).is-style-outline { + padding-top: 0.667em; + padding-bottom: 0.667em; +} + + /* * Comment Form Fields */ From c52869cc313f3b1076588d96fd324cb763bb7800 Mon Sep 17 00:00:00 2001 From: MaggieCabrera Date: Thu, 26 May 2022 11:01:20 +0200 Subject: [PATCH 7/8] added related GB issue --- archeo/style.css | 1 + 1 file changed, 1 insertion(+) diff --git a/archeo/style.css b/archeo/style.css index ccacf50e10..47bd266897 100644 --- a/archeo/style.css +++ b/archeo/style.css @@ -99,6 +99,7 @@ a:active, /* * Outline block button needs a padding tweak so it's the same size of normal buttons + * https://github.com/WordPress/gutenberg/issues/27476 */ .is-style-outline > :where(.wp-block-button__link), :where(.wp-block-button__link).is-style-outline { From c7890323a5ea44d3461b17674576748d5dc79946 Mon Sep 17 00:00:00 2001 From: MaggieCabrera Date: Wed, 8 Jun 2022 11:37:03 +0200 Subject: [PATCH 8/8] removed file button css --- archeo/style.css | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/archeo/style.css b/archeo/style.css index 47bd266897..b7e02e8ed9 100644 --- a/archeo/style.css +++ b/archeo/style.css @@ -82,21 +82,6 @@ a:active, background-color: var(--wp--preset--color--primary); } -/* - * File Block button styles. - * Necessary until the following issues are resolved in Gutenberg: - * https://github.com/WordPress/gutenberg/issues/27760 - */ - -.wp-block-file .wp-block-file__button { - background-color: var(--wp--preset--color--foreground); - border-radius: 0; - border: none; - color: var(--wp--preset--color--background); - font-size: var(--wp--preset--font-size--normal); - padding: calc(0.667em + 2px) calc(1.333em + 2px); -} - /* * Outline block button needs a padding tweak so it's the same size of normal buttons * https://github.com/WordPress/gutenberg/issues/27476