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.


git-svn-id: https://develop.svn.wordpress.org/trunk@58853 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Tammie Lister 2024-08-05 10:07:32 +00:00
parent ddd53c27ad
commit b17b5d1854
7 changed files with 35 additions and 37 deletions

View File

@ -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;
}

File diff suppressed because one or more lines are too long

View File

@ -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 {

View File

@ -50,4 +50,15 @@
.post-thumbnail .wp-post-image {
min-width: auto;
}
.wp-block-group {
&:before,
&:after {
content: "";
display: block;
clear: both;
}
}
}

View File

@ -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;
}

View File

@ -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;
}

File diff suppressed because one or more lines are too long