From e987cf907fece9336a5a9e2920131ef7cab380be Mon Sep 17 00:00:00 2001 From: Jeff Ong Date: Tue, 17 Aug 2021 17:05:53 -0400 Subject: [PATCH 1/3] Refactor text styles and add padding to groups w border. --- skatepark/assets/theme.css | 9 +++++++++ skatepark/sass/blocks/_group.scss | 3 +++ skatepark/sass/theme.scss | 1 + 3 files changed, 13 insertions(+) create mode 100644 skatepark/sass/blocks/_group.scss diff --git a/skatepark/assets/theme.css b/skatepark/assets/theme.css index 58e14e24b4..ce6a130024 100644 --- a/skatepark/assets/theme.css +++ b/skatepark/assets/theme.css @@ -43,9 +43,14 @@ color: var(--wp--preset--color--background); } +<<<<<<< HEAD p { margin-top: calc( 0.5 * var(--wp--custom--margin--vertical)); margin-bottom: calc( 0.5 * var(--wp--custom--margin--vertical)); +======= +.wp-block-column > p:first-child, .wp-block-column > h1:first-child, .wp-block-column > h2:first-child, .wp-block-column > h3:first-child, .wp-block-column > h4:first-child, .wp-block-column > h5:first-child, .wp-block-column > h6:first-child, .wp-block-group > p:first-child, .wp-block-group > h1:first-child, .wp-block-group > h2:first-child, .wp-block-group > h3:first-child, .wp-block-group > h4:first-child, .wp-block-group > h5:first-child, .wp-block-group > h6:first-child { + margin-top: 0; +>>>>>>> Refactor text styles and add padding to groups w border. } .wp-block-post-author__content { @@ -139,6 +144,10 @@ p { background-color: var(--wp--custom--button--color--text); } +.wp-block-group.has-border-color { + padding: var(--wp--custom--margin--vertical); +} + .wp-block-post-comments .reply a { --wp--custom--button--typography--font-size: var(--wp--preset--font-size--normal); border-style: var(--wp--custom--button--border--style); diff --git a/skatepark/sass/blocks/_group.scss b/skatepark/sass/blocks/_group.scss new file mode 100644 index 0000000000..7d306f967e --- /dev/null +++ b/skatepark/sass/blocks/_group.scss @@ -0,0 +1,3 @@ +.wp-block-group.has-border-color { + padding: var(--wp--custom--margin--vertical); +} \ No newline at end of file diff --git a/skatepark/sass/theme.scss b/skatepark/sass/theme.scss index d6a4272760..28e77fb31e 100644 --- a/skatepark/sass/theme.scss +++ b/skatepark/sass/theme.scss @@ -4,6 +4,7 @@ @import "base/mixins"; @import "blocks/author"; @import "blocks/buttons"; +@import "blocks/group"; @import "blocks/post-comments"; @import "blocks/query"; @import "blocks/search"; From 52a046ac59c296b212af85759323451c51913a35 Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Wed, 25 Aug 2021 08:53:34 +0100 Subject: [PATCH 2/3] move group and column margin resets to blockbase --- blockbase/assets/ponyfill.css | 4 ++++ blockbase/sass/base/_text.scss | 8 +++++++- skatepark/assets/theme.css | 3 +++ skatepark/sass/base/_text.scss | 5 ----- skatepark/sass/blocks/_group.scss | 3 --- skatepark/sass/theme.scss | 1 - 6 files changed, 14 insertions(+), 10 deletions(-) delete mode 100644 skatepark/sass/blocks/_group.scss diff --git a/blockbase/assets/ponyfill.css b/blockbase/assets/ponyfill.css index 98d02e9e53..1e3ad28c72 100644 --- a/blockbase/assets/ponyfill.css +++ b/blockbase/assets/ponyfill.css @@ -159,6 +159,10 @@ p { margin-bottom: var(--wp--custom--margin--vertical); } +.wp-block-column :first-child, .wp-block-group :first-child { + margin-top: 0; +} + .image-no-margin { margin: 0; } diff --git a/blockbase/sass/base/_text.scss b/blockbase/sass/base/_text.scss index 47eecf9bf9..144a91ea42 100644 --- a/blockbase/sass/base/_text.scss +++ b/blockbase/sass/base/_text.scss @@ -10,4 +10,10 @@ p { margin-top: var(--wp--custom--margin--vertical); margin-bottom: var(--wp--custom--margin--vertical); -} \ No newline at end of file +} + +.wp-block-column, .wp-block-group { + :first-child { + margin-top: 0; + } +} diff --git a/skatepark/assets/theme.css b/skatepark/assets/theme.css index ce6a130024..89bc0c6e8d 100644 --- a/skatepark/assets/theme.css +++ b/skatepark/assets/theme.css @@ -43,6 +43,7 @@ color: var(--wp--preset--color--background); } +<<<<<<< HEAD <<<<<<< HEAD p { margin-top: calc( 0.5 * var(--wp--custom--margin--vertical)); @@ -53,6 +54,8 @@ p { >>>>>>> Refactor text styles and add padding to groups w border. } +======= +>>>>>>> move group and column margin resets to blockbase .wp-block-post-author__content { display: flex; flex-direction: column; diff --git a/skatepark/sass/base/_text.scss b/skatepark/sass/base/_text.scss index 8a160c9798..0fafa0fab4 100644 --- a/skatepark/sass/base/_text.scss +++ b/skatepark/sass/base/_text.scss @@ -2,8 +2,3 @@ ::selection { color: var(--wp--preset--color--background); } - -p { - margin-top: calc( 0.5 * var(--wp--custom--margin--vertical) ); - margin-bottom: calc( 0.5 * var(--wp--custom--margin--vertical) ); -} \ No newline at end of file diff --git a/skatepark/sass/blocks/_group.scss b/skatepark/sass/blocks/_group.scss deleted file mode 100644 index 7d306f967e..0000000000 --- a/skatepark/sass/blocks/_group.scss +++ /dev/null @@ -1,3 +0,0 @@ -.wp-block-group.has-border-color { - padding: var(--wp--custom--margin--vertical); -} \ No newline at end of file diff --git a/skatepark/sass/theme.scss b/skatepark/sass/theme.scss index 28e77fb31e..d6a4272760 100644 --- a/skatepark/sass/theme.scss +++ b/skatepark/sass/theme.scss @@ -4,7 +4,6 @@ @import "base/mixins"; @import "blocks/author"; @import "blocks/buttons"; -@import "blocks/group"; @import "blocks/post-comments"; @import "blocks/query"; @import "blocks/search"; From 72f4aadb038bbe57587bfdb7217a66ba02cb8fa9 Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Wed, 25 Aug 2021 08:55:38 +0100 Subject: [PATCH 3/3] rebuild --- skatepark/assets/theme.css | 4 ---- 1 file changed, 4 deletions(-) diff --git a/skatepark/assets/theme.css b/skatepark/assets/theme.css index 89bc0c6e8d..e9b9a3c8fd 100644 --- a/skatepark/assets/theme.css +++ b/skatepark/assets/theme.css @@ -147,10 +147,6 @@ p { background-color: var(--wp--custom--button--color--text); } -.wp-block-group.has-border-color { - padding: var(--wp--custom--margin--vertical); -} - .wp-block-post-comments .reply a { --wp--custom--button--typography--font-size: var(--wp--preset--font-size--normal); border-style: var(--wp--custom--button--border--style);