Twenty Twenty-One: Remove spacer block styles.

The theme includes styles for the spacer block for the front which appears to be unnecessary:
* It adds `display: block` even though that is the default.
* It removes top and bottom margin, even though this is not needed in the post content because of collapsing margins between blocks.
* It uses a custom CSS property to force a specific height on mobile. This affects the patterns in the theme negatively.

It also causes styling problems:
* When the spacer block has a height set to `0` in the navigation block, as the theme forces this to be larger on smaller screens.
* When the block is horizontal. Horizontal was not an option when this style was added.

Consequences of removal:
* Removing the use of the custom CSS property will cause a style change for websites that have adjusted the spacing property.

Follow-up to [49216], [49574].

Props poena, mukesh27.
Fixes #56222.
Built from https://develop.svn.wordpress.org/trunk@54103


git-svn-id: http://core.svn.wordpress.org/trunk@53662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2022-09-08 15:48:08 +00:00
parent ffaf3da76f
commit 25e697c948
7 changed files with 1 additions and 55 deletions

View File

@ -66,7 +66,6 @@ Twenty Twenty-One is distributed under the terms of the GNU GPL.
* Quote................Specific styles for the quote block.
* Search...............Specific styles for the search block.
* Separator............Specific styles for the separator block.
* Spacer...............Specific styles for the spacer block.
* Table................Specific styles for the table block.
* Verse................Specific styles for the verse block.
* Video................Specific styles for the video block.
@ -4371,18 +4370,6 @@ hr.wp-block-separator.is-style-dots:before {
background: none;
}
.wp-block-spacer {
display: block;
margin-bottom: 0 !important;
margin-top: 0 !important;
}
@media only screen and (max-width: 481px) {
.wp-block-spacer[style] {
height: 20px !important;
}
}
table,
.wp-block-table {
width: 100%;

View File

@ -29,7 +29,6 @@
@import "search/style";
@import "separator/style";
@import "social-icons/style";
@import "spacer/style";
@import "table/style";
@import "tag-clould/style";
@import "verse/style";

View File

@ -1,13 +0,0 @@
.wp-block-spacer {
display: block;
// Remove vertical margins
margin-bottom: 0 !important;
margin-top: 0 !important;
@include media(mobile-only) {
&[style] {
height: var(--global--spacing-unit) !important;
}
}
}

View File

@ -47,7 +47,6 @@
* Quote................Specific styles for the quote block.
* Search...............Specific styles for the search block.
* Separator............Specific styles for the separator block.
* Spacer...............Specific styles for the spacer block.
* Table................Specific styles for the table block.
* Verse................Specific styles for the verse block.
* Video................Specific styles for the video block.

View File

@ -66,7 +66,6 @@ Twenty Twenty-One is distributed under the terms of the GNU GPL.
* Quote................Specific styles for the quote block.
* Search...............Specific styles for the search block.
* Separator............Specific styles for the separator block.
* Spacer...............Specific styles for the spacer block.
* Table................Specific styles for the table block.
* Verse................Specific styles for the verse block.
* Video................Specific styles for the video block.
@ -3375,18 +3374,6 @@ hr.wp-block-separator.is-style-dots:before {
background: none;
}
.wp-block-spacer {
display: block;
margin-bottom: 0 !important;
margin-top: 0 !important;
}
@media only screen and (max-width: 481px) {
.wp-block-spacer[style] {
height: var(--global--spacing-unit) !important;
}
}
table,
.wp-block-table {
width: 100%;

View File

@ -66,7 +66,6 @@ Twenty Twenty-One is distributed under the terms of the GNU GPL.
* Quote................Specific styles for the quote block.
* Search...............Specific styles for the search block.
* Separator............Specific styles for the separator block.
* Spacer...............Specific styles for the spacer block.
* Table................Specific styles for the table block.
* Verse................Specific styles for the verse block.
* Video................Specific styles for the video block.
@ -3385,18 +3384,6 @@ hr.wp-block-separator.is-style-dots:before {
background: none;
}
.wp-block-spacer {
display: block;
margin-bottom: 0 !important;
margin-top: 0 !important;
}
@media only screen and (max-width: 481px) {
.wp-block-spacer[style] {
height: var(--global--spacing-unit) !important;
}
}
table,
.wp-block-table {
width: 100%;

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-alpha-54102';
$wp_version = '6.1-alpha-54103';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.