From bafb68b0a40d3772fb797d1291de99e239a01e66 Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Thu, 18 Mar 2021 11:13:04 -0400 Subject: [PATCH 1/9] Update TT1 Blocks to use Gutenberg alignments --- tt1-blocks/assets/css/style-editor.css | 15 ------- tt1-blocks/block-templates/index.html | 2 +- tt1-blocks/block-templates/page-home.html | 2 +- tt1-blocks/block-templates/page.html | 2 +- tt1-blocks/block-templates/single.html | 2 +- tt1-blocks/experimental-theme.json | 8 ++-- tt1-blocks/functions.php | 3 +- tt1-blocks/style.css | 48 ----------------------- 8 files changed, 9 insertions(+), 73 deletions(-) delete mode 100644 tt1-blocks/assets/css/style-editor.css diff --git a/tt1-blocks/assets/css/style-editor.css b/tt1-blocks/assets/css/style-editor.css deleted file mode 100644 index c1fb096e..00000000 --- a/tt1-blocks/assets/css/style-editor.css +++ /dev/null @@ -1,15 +0,0 @@ -/*-------------------------------------------------------------- -# Editor Alignment Widths ---------------------------------------------------------------*/ - -.wp-block { - max-width: var(--wp--custom--responsive--aligndefault-width); -} - -.wp-block[data-align="wide"] { - max-width: var(--wp--custom--responsive--alignwide-width); -} - -.wp-block[data-align="full"] { - max-width: inherit; -} \ No newline at end of file diff --git a/tt1-blocks/block-templates/index.html b/tt1-blocks/block-templates/index.html index f4ed6348..295f75d4 100644 --- a/tt1-blocks/block-templates/index.html +++ b/tt1-blocks/block-templates/index.html @@ -9,7 +9,7 @@ - + diff --git a/tt1-blocks/block-templates/page-home.html b/tt1-blocks/block-templates/page-home.html index 1e7efbf1..0f2095bf 100644 --- a/tt1-blocks/block-templates/page-home.html +++ b/tt1-blocks/block-templates/page-home.html @@ -3,7 +3,7 @@
- +
diff --git a/tt1-blocks/block-templates/page.html b/tt1-blocks/block-templates/page.html index a9aae45d..598f7505 100644 --- a/tt1-blocks/block-templates/page.html +++ b/tt1-blocks/block-templates/page.html @@ -13,7 +13,7 @@ - + diff --git a/tt1-blocks/block-templates/single.html b/tt1-blocks/block-templates/single.html index b6d6fb97..245e2e39 100644 --- a/tt1-blocks/block-templates/single.html +++ b/tt1-blocks/block-templates/single.html @@ -13,7 +13,7 @@ - + diff --git a/tt1-blocks/experimental-theme.json b/tt1-blocks/experimental-theme.json index e0c7190a..323b27ca 100644 --- a/tt1-blocks/experimental-theme.json +++ b/tt1-blocks/experimental-theme.json @@ -105,6 +105,10 @@ } ] }, + "layout": { + "contentSize": "610px", + "wideSize": "1240px" + }, "typography": { "customLineHeight": true, "fontSizes": [ @@ -178,10 +182,6 @@ "heading": 1.3, "page-title": 1.1 }, - "responsive": { - "aligndefault-width": "610px", - "alignwide-width": "1240px" - }, "spacing": { "unit": "20px", "horizontal": "25px", diff --git a/tt1-blocks/functions.php b/tt1-blocks/functions.php index e06a784a..643748ca 100644 --- a/tt1-blocks/functions.php +++ b/tt1-blocks/functions.php @@ -53,8 +53,7 @@ function tt1_blocks_setup() { // Enqueue editor styles. add_editor_style( array( './assets/css/blocks.css', - './assets/css/style-shared.css', - './assets/css/style-editor.css', + './assets/css/style-shared.css' ) ); // Add support for responsive embedded content. diff --git a/tt1-blocks/style.css b/tt1-blocks/style.css index 4c38072b..a770ba53 100644 --- a/tt1-blocks/style.css +++ b/tt1-blocks/style.css @@ -31,51 +31,3 @@ TT1 Blocks is distributed under the terms of the GNU GPL. body { margin: 0; } - -/*-------------------------------------------------------------- -# Alignments ---------------------------------------------------------------*/ - -* { - box-sizing: border-box; -} - -.wp-site-blocks, -.wp-block-template-part.alignfull { - padding: 0 var(--wp--custom--spacing--horizontal); -} - -.wp-site-blocks * { - margin-left: auto; - margin-right: auto; -} - -.wp-site-blocks *:not(.wp-block-post-content):not(.alignfull):not(.alignwide):not([class$="__inner-container"]):not(img) { - max-width: var(--wp--custom--responsive--aligndefault-width); -} - -.wp-site-blocks .alignwide { - width: var(--wp--custom--responsive--alignwide-width); - max-width: 100%; -} - -.aligncenter { - text-align: center; -} - -.wp-site-blocks .alignleft { - float: left; - margin-right: 2em; - max-width: 360px; -} - -.wp-site-blocks .alignright { - float: right; - margin-left: 2em; - max-width: 360px; -} - -.wp-site-blocks .alignfull { - margin: 0 calc(0px - var(--wp--custom--spacing--horizontal)); - width: calc(100% + (2 - var(--wp--custom--spacing--horizontal))); -} From c0ffaf4f2386999153453d3d394e7bcdf61ec72c Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Fri, 19 Mar 2021 15:23:57 -0400 Subject: [PATCH 2/9] Remove align-wide theme support. --- tt1-blocks/functions.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/tt1-blocks/functions.php b/tt1-blocks/functions.php index 643748ca..fb9c6353 100644 --- a/tt1-blocks/functions.php +++ b/tt1-blocks/functions.php @@ -44,9 +44,6 @@ function tt1_blocks_setup() { // Add support for Block Styles. add_theme_support( 'wp-block-styles' ); - // Add support for full and wide align images. - add_theme_support( 'align-wide' ); - // Add support for editor styles. add_theme_support( 'editor-styles' ); From af20e47b88ba02f1f970ab700b906cb42561d153 Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Mon, 22 Mar 2021 10:48:35 -0400 Subject: [PATCH 3/9] Remove group inner containers, add layout inherit:true where applicable. --- tt1-blocks/block-templates/404.html | 36 ++++++------ tt1-blocks/block-templates/index.html | 71 ++++++++++------------- tt1-blocks/block-templates/page-home.html | 6 +- tt1-blocks/block-templates/page.html | 23 ++++---- tt1-blocks/block-templates/single.html | 61 ++++++++++--------- 5 files changed, 91 insertions(+), 106 deletions(-) diff --git a/tt1-blocks/block-templates/404.html b/tt1-blocks/block-templates/404.html index 7abdd5dd..3f97ae49 100644 --- a/tt1-blocks/block-templates/404.html +++ b/tt1-blocks/block-templates/404.html @@ -1,30 +1,28 @@ - +
-
- -

Nothing Here

- + +

Nothing Here

+ - -
- + +
+ - - - + + + - -

It looks like nothing was found at this location. Maybe try a search?

- + +

It looks like nothing was found at this location. Maybe try a search?

+ - + - - - -
+ + +
diff --git a/tt1-blocks/block-templates/index.html b/tt1-blocks/block-templates/index.html index 295f75d4..12721e2b 100644 --- a/tt1-blocks/block-templates/index.html +++ b/tt1-blocks/block-templates/index.html @@ -1,57 +1,48 @@ - +
-
+ + + - + - - + + + - + +
+ - - - + +
+
- -
- +
+ - -
-
+ +
-
- +
+
+ - -
+ + + + -
-
- + +
- - - + - - - -
- - - - - -
- - - - -
+
+ +
diff --git a/tt1-blocks/block-templates/page-home.html b/tt1-blocks/block-templates/page-home.html index 0f2095bf..19f5ede0 100644 --- a/tt1-blocks/block-templates/page-home.html +++ b/tt1-blocks/block-templates/page-home.html @@ -1,10 +1,8 @@ - +
-
- -
+
diff --git a/tt1-blocks/block-templates/page.html b/tt1-blocks/block-templates/page.html index 598f7505..1c003ad3 100644 --- a/tt1-blocks/block-templates/page.html +++ b/tt1-blocks/block-templates/page.html @@ -1,21 +1,20 @@ - +
-
- + - -
- + +
+ - - - + + + - - -
+ + +
diff --git a/tt1-blocks/block-templates/single.html b/tt1-blocks/block-templates/single.html index 245e2e39..6f475819 100644 --- a/tt1-blocks/block-templates/single.html +++ b/tt1-blocks/block-templates/single.html @@ -1,47 +1,46 @@ - +
-
- + - -
- + +
+ - - - + + + - + - - - + + + - -
- + +
+ - -
-
+ +
+
-
- +
+ - -
+ +
-
-
- +
+
+ - - - - -
+ + + + +
From 70a0783f056c4e15a2542cabf09f838fd2940faf Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Mon, 22 Mar 2021 12:06:17 -0400 Subject: [PATCH 4/9] Template cleanup --- tt1-blocks/block-templates/404.html | 4 ++-- tt1-blocks/block-templates/index.html | 4 ++-- tt1-blocks/block-templates/page-home.html | 4 ++-- tt1-blocks/block-templates/page.html | 4 ++-- tt1-blocks/block-templates/single.html | 8 ++------ 5 files changed, 10 insertions(+), 14 deletions(-) diff --git a/tt1-blocks/block-templates/404.html b/tt1-blocks/block-templates/404.html index 3f97ae49..8098ea3a 100644 --- a/tt1-blocks/block-templates/404.html +++ b/tt1-blocks/block-templates/404.html @@ -1,4 +1,4 @@ - +
@@ -26,4 +26,4 @@

Nothing Here

- \ No newline at end of file + \ No newline at end of file diff --git a/tt1-blocks/block-templates/index.html b/tt1-blocks/block-templates/index.html index 12721e2b..4240e3b9 100644 --- a/tt1-blocks/block-templates/index.html +++ b/tt1-blocks/block-templates/index.html @@ -1,4 +1,4 @@ - +
@@ -46,4 +46,4 @@
- + diff --git a/tt1-blocks/block-templates/page-home.html b/tt1-blocks/block-templates/page-home.html index 19f5ede0..d4b718e2 100644 --- a/tt1-blocks/block-templates/page-home.html +++ b/tt1-blocks/block-templates/page-home.html @@ -1,8 +1,8 @@ - +
- + diff --git a/tt1-blocks/block-templates/page.html b/tt1-blocks/block-templates/page.html index 1c003ad3..212144b7 100644 --- a/tt1-blocks/block-templates/page.html +++ b/tt1-blocks/block-templates/page.html @@ -1,4 +1,4 @@ - +
@@ -18,4 +18,4 @@
- \ No newline at end of file + \ No newline at end of file diff --git a/tt1-blocks/block-templates/single.html b/tt1-blocks/block-templates/single.html index 6f475819..40b3362f 100644 --- a/tt1-blocks/block-templates/single.html +++ b/tt1-blocks/block-templates/single.html @@ -1,7 +1,5 @@ - + - -
@@ -41,7 +39,5 @@ -
- - \ No newline at end of file + \ No newline at end of file From b2fa32b8280aab58025973e73c7977d366ccd45a Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Mon, 22 Mar 2021 17:34:20 +0100 Subject: [PATCH 5/9] Update the single template to allow the header to be wide aligned while the content area allows full widths --- tt1-blocks/block-templates/single.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tt1-blocks/block-templates/single.html b/tt1-blocks/block-templates/single.html index 40b3362f..5201db6a 100644 --- a/tt1-blocks/block-templates/single.html +++ b/tt1-blocks/block-templates/single.html @@ -1,5 +1,7 @@ + +
@@ -9,9 +11,13 @@ +
+ - + + +
@@ -39,5 +45,7 @@ +
+ \ No newline at end of file From 86fb5f8a92d5a0dfcba6f4ca24fcfbc25428fd8e Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Mon, 22 Mar 2021 12:55:24 -0400 Subject: [PATCH 6/9] Add missing main group wrapper to the single template. --- tt1-blocks/block-templates/single.html | 70 ++++++++++++++------------ 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/tt1-blocks/block-templates/single.html b/tt1-blocks/block-templates/single.html index 5201db6a..e34f2c76 100644 --- a/tt1-blocks/block-templates/single.html +++ b/tt1-blocks/block-templates/single.html @@ -1,50 +1,54 @@ - +
- + +
+ - -
- + +
+ - - - -
- + + + +
+ - + - -
- - - + +
+ + + - -
- + +
+ - -
-
+ +
+
-
- +
+ - -
+ +
-
-
- +
+
+ - - - + + + - + +
+
From 21a8e184cf616c4f2527bad60c6c7eff972fa01a Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Tue, 23 Mar 2021 11:29:25 +0000 Subject: [PATCH 7/9] Remove unnecessary alignfull declarations --- tt1-blocks/block-templates/404.html | 8 ++++---- tt1-blocks/block-templates/index.html | 8 ++++---- tt1-blocks/block-templates/page-home.html | 8 ++++---- tt1-blocks/block-templates/page.html | 8 ++++---- tt1-blocks/block-templates/single.html | 4 ++-- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tt1-blocks/block-templates/404.html b/tt1-blocks/block-templates/404.html index 8098ea3a..2e384736 100644 --- a/tt1-blocks/block-templates/404.html +++ b/tt1-blocks/block-templates/404.html @@ -1,7 +1,7 @@ - + - -
+ +

Nothing Here

@@ -26,4 +26,4 @@

Nothing Here

- \ No newline at end of file + diff --git a/tt1-blocks/block-templates/index.html b/tt1-blocks/block-templates/index.html index 4240e3b9..be655521 100644 --- a/tt1-blocks/block-templates/index.html +++ b/tt1-blocks/block-templates/index.html @@ -1,7 +1,7 @@ - + - -
+ +
@@ -46,4 +46,4 @@
- + diff --git a/tt1-blocks/block-templates/page-home.html b/tt1-blocks/block-templates/page-home.html index d4b718e2..75e3f000 100644 --- a/tt1-blocks/block-templates/page-home.html +++ b/tt1-blocks/block-templates/page-home.html @@ -1,8 +1,8 @@ - + - -
+ +
- + diff --git a/tt1-blocks/block-templates/page.html b/tt1-blocks/block-templates/page.html index 212144b7..4221c3e9 100644 --- a/tt1-blocks/block-templates/page.html +++ b/tt1-blocks/block-templates/page.html @@ -1,7 +1,7 @@ - + - -
+ +
@@ -18,4 +18,4 @@
- \ No newline at end of file + diff --git a/tt1-blocks/block-templates/single.html b/tt1-blocks/block-templates/single.html index e34f2c76..dd6c2cb3 100644 --- a/tt1-blocks/block-templates/single.html +++ b/tt1-blocks/block-templates/single.html @@ -1,4 +1,4 @@ - +
@@ -52,4 +52,4 @@
- \ No newline at end of file + From 406df13421f1b7098d3e7012e44a5a9f6a60d09d Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Tue, 23 Mar 2021 11:36:47 +0000 Subject: [PATCH 8/9] remove alignment rules for the separataor --- tt1-blocks/assets/css/blocks.css | 21 --------------------- tt1-blocks/block-template-parts/footer.html | 2 +- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/tt1-blocks/assets/css/blocks.css b/tt1-blocks/assets/css/blocks.css index 45a0d057..04e17d22 100644 --- a/tt1-blocks/assets/css/blocks.css +++ b/tt1-blocks/assets/css/blocks.css @@ -184,23 +184,6 @@ hr[style*="text-align: right"], border-right-color: var(--wp--preset--color--dark-gray); } -hr:not(.is-style-wide):not(.is-style-dots), -.wp-block-separator:not(.is-style-wide):not(.is-style-dots) { - max-width: var(--wp--custom--responsive--aligndefault-width); -} - -.wp-block[data-align="wide"] .wp-block-separator:not(.is-style-wide):not(.is-style-dots), -hr.alignwide:not(.is-style-wide):not(.is-style-dots), -.wp-block-separator.alignwide:not(.is-style-wide):not(.is-style-dots) { - max-width: 100%; -} - -.wp-block[data-align="full"] .wp-block-separator:not(.is-style-wide):not(.is-style-dots), -hr.alignfull:not(.is-style-wide):not(.is-style-dots), -.wp-block-separator.alignfull:not(.is-style-wide):not(.is-style-dots) { - max-width: inherit; -} - hr.is-style-twentytwentyone-separator-thick, .wp-block-separator.is-style-twentytwentyone-separator-thick { border-bottom-width: 3px; @@ -210,10 +193,6 @@ hr.is-style-twentytwentyone-separator-thick, border-bottom: none; } -.wp-block-separator.is-style-dots.alignwide { - width: 100%; -} - .wp-block-separator.is-style-dots > hr { display: none; } diff --git a/tt1-blocks/block-template-parts/footer.html b/tt1-blocks/block-template-parts/footer.html index 297b9922..7ed9e2e7 100644 --- a/tt1-blocks/block-template-parts/footer.html +++ b/tt1-blocks/block-template-parts/footer.html @@ -41,4 +41,4 @@

Proudly powered by WordPress.

- \ No newline at end of file + From 28f278212967395789e444eed2f02af732ee7260 Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Tue, 23 Mar 2021 09:20:25 -0400 Subject: [PATCH 9/9] Update all templates for proper alignment. --- tt1-blocks/block-templates/index.html | 67 ++++++++++++++--------- tt1-blocks/block-templates/page-home.html | 5 +- tt1-blocks/block-templates/page.html | 28 ++++++---- 3 files changed, 61 insertions(+), 39 deletions(-) diff --git a/tt1-blocks/block-templates/index.html b/tt1-blocks/block-templates/index.html index be655521..25938dc8 100644 --- a/tt1-blocks/block-templates/index.html +++ b/tt1-blocks/block-templates/index.html @@ -1,47 +1,60 @@ - +
- - + +
+ +
+ - - - + - -
- + +
+ + + - -
-
+ +
+ -
- + +
+
- -
+
+ -
-
- + +
- - - +
+
+ + + + + +
+ - -
+ +
+ +
- + -
- +
+ +
+
diff --git a/tt1-blocks/block-templates/page-home.html b/tt1-blocks/block-templates/page-home.html index 75e3f000..29feb58f 100644 --- a/tt1-blocks/block-templates/page-home.html +++ b/tt1-blocks/block-templates/page-home.html @@ -1,8 +1,9 @@ - +
- +
+ diff --git a/tt1-blocks/block-templates/page.html b/tt1-blocks/block-templates/page.html index 4221c3e9..a48cc737 100644 --- a/tt1-blocks/block-templates/page.html +++ b/tt1-blocks/block-templates/page.html @@ -1,20 +1,28 @@ - +
- + +
+ - -
- + +
+ - - - + + + +
+ - + - + +
+ +
+