From ae993cf8e217d2508034c6b4132d3bf8e85736b1 Mon Sep 17 00:00:00 2001 From: Tammie Lister Date: Mon, 5 Aug 2024 10:09:15 +0000 Subject: [PATCH] Twenty Twenty-One: Fixes float clearing elements being visible in Row and Grid blocks. The grid layout looks different between front and back end due to the float clearing elements being visible in Row and Grid blocks. This moves the hack rather than deletes it. Props up1512001, sabernhardt, poena. Fixes #61611. Built from https://develop.svn.wordpress.org/trunk@58853 git-svn-id: http://core.svn.wordpress.org/trunk@58249 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../themes/twentytwentyone/assets/css/ie.css | 16 +++++++--------- .../assets/sass/05-blocks/group/_style.scss | 9 +-------- .../assets/sass/07-utilities/ie.scss | 11 +++++++++++ wp-content/themes/twentytwentyone/style-rtl.css | 16 +++++++--------- wp-content/themes/twentytwentyone/style.css | 16 +++++++--------- wp-includes/version.php | 2 +- 6 files changed, 34 insertions(+), 36 deletions(-) diff --git a/wp-content/themes/twentytwentyone/assets/css/ie.css b/wp-content/themes/twentytwentyone/assets/css/ie.css index 201268346d..df005f83aa 100644 --- a/wp-content/themes/twentytwentyone/assets/css/ie.css +++ b/wp-content/themes/twentytwentyone/assets/css/ie.css @@ -2239,18 +2239,9 @@ input[type=reset]:disabled, } .wp-block-group { - display: block; - clear: both; display: flow-root; } -.wp-block-group:before, -.wp-block-group:after { - content: ""; - display: block; - clear: both; -} - .wp-block-group .wp-block-group__inner-container { margin-left: auto; margin-right: auto; @@ -6308,3 +6299,10 @@ footer { .is-IE .post-thumbnail .wp-post-image { min-width: auto; } + +.is-IE .wp-block-group:before, +.is-IE .wp-block-group:after { + content: ""; + display: block; + clear: both; +} diff --git a/wp-content/themes/twentytwentyone/assets/sass/05-blocks/group/_style.scss b/wp-content/themes/twentytwentyone/assets/sass/05-blocks/group/_style.scss index 72c756d331..29046eea63 100644 --- a/wp-content/themes/twentytwentyone/assets/sass/05-blocks/group/_style.scss +++ b/wp-content/themes/twentytwentyone/assets/sass/05-blocks/group/_style.scss @@ -1,18 +1,11 @@ .wp-block-group { + // Start IE clearfix. // This hack is only necessary because we want to support IE11. // If we don't want to support IE11, then "display: flow-root" would suffice. - display: block; - clear: both; display: flow-root; // stylelint-disable-line declaration-block-no-duplicate-properties - &:before, - &:after { - content: ""; - display: block; - clear: both; - } // End IE clearfix. .wp-block-group__inner-container { diff --git a/wp-content/themes/twentytwentyone/assets/sass/07-utilities/ie.scss b/wp-content/themes/twentytwentyone/assets/sass/07-utilities/ie.scss index 7df9025f21..cf3eddd280 100644 --- a/wp-content/themes/twentytwentyone/assets/sass/07-utilities/ie.scss +++ b/wp-content/themes/twentytwentyone/assets/sass/07-utilities/ie.scss @@ -50,4 +50,15 @@ .post-thumbnail .wp-post-image { min-width: auto; } + + .wp-block-group { + + &:before, + &:after { + content: ""; + display: block; + clear: both; + } + } + } diff --git a/wp-content/themes/twentytwentyone/style-rtl.css b/wp-content/themes/twentytwentyone/style-rtl.css index 90f1482b2c..cc36e5d126 100644 --- a/wp-content/themes/twentytwentyone/style-rtl.css +++ b/wp-content/themes/twentytwentyone/style-rtl.css @@ -2131,18 +2131,9 @@ input[type=reset]:disabled, } .wp-block-group { - display: block; - clear: both; display: flow-root; } -.wp-block-group:before, -.wp-block-group:after { - content: ""; - display: block; - clear: both; -} - .wp-block-group .wp-block-group__inner-container { margin-right: auto; margin-left: auto; @@ -5882,3 +5873,10 @@ footer { .is-IE .post-thumbnail .wp-post-image { min-width: auto; } + +.is-IE .wp-block-group:before, +.is-IE .wp-block-group:after { + content: ""; + display: block; + clear: both; +} diff --git a/wp-content/themes/twentytwentyone/style.css b/wp-content/themes/twentytwentyone/style.css index e832c2d075..a6b4ab109c 100644 --- a/wp-content/themes/twentytwentyone/style.css +++ b/wp-content/themes/twentytwentyone/style.css @@ -2141,18 +2141,9 @@ input[type=reset]:disabled, } .wp-block-group { - display: block; - clear: both; display: flow-root; } -.wp-block-group:before, -.wp-block-group:after { - content: ""; - display: block; - clear: both; -} - .wp-block-group .wp-block-group__inner-container { margin-left: auto; margin-right: auto; @@ -5918,3 +5909,10 @@ footer { .is-IE .post-thumbnail .wp-post-image { min-width: auto; } + +.is-IE .wp-block-group:before, +.is-IE .wp-block-group:after { + content: ""; + display: block; + clear: both; +} diff --git a/wp-includes/version.php b/wp-includes/version.php index 44c34e1ef0..960dde55fd 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.7-alpha-58852'; +$wp_version = '6.7-alpha-58853'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.