Skip to content

Commit 4ae6c24

Browse files
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: https://core.svn.wordpress.org/trunk@53662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent ee9635c commit 4ae6c24

File tree

7 files changed

+1
-55
lines changed

7 files changed

+1
-55
lines changed

wp-content/themes/twentytwentyone/assets/css/ie.css

-13
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ Twenty Twenty-One is distributed under the terms of the GNU GPL.
6666
* Quote................Specific styles for the quote block.
6767
* Search...............Specific styles for the search block.
6868
* Separator............Specific styles for the separator block.
69-
* Spacer...............Specific styles for the spacer block.
7069
* Table................Specific styles for the table block.
7170
* Verse................Specific styles for the verse block.
7271
* Video................Specific styles for the video block.
@@ -4371,18 +4370,6 @@ hr.wp-block-separator.is-style-dots:before {
43714370
background: none;
43724371
}
43734372

4374-
.wp-block-spacer {
4375-
display: block;
4376-
margin-bottom: 0 !important;
4377-
margin-top: 0 !important;
4378-
}
4379-
@media only screen and (max-width: 481px) {
4380-
4381-
.wp-block-spacer[style] {
4382-
height: 20px !important;
4383-
}
4384-
}
4385-
43864373
table,
43874374
.wp-block-table {
43884375
width: 100%;

wp-content/themes/twentytwentyone/assets/sass/05-blocks/blocks.scss

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
@import "search/style";
3030
@import "separator/style";
3131
@import "social-icons/style";
32-
@import "spacer/style";
3332
@import "table/style";
3433
@import "tag-clould/style";
3534
@import "verse/style";

wp-content/themes/twentytwentyone/assets/sass/05-blocks/spacer/_style.scss

-13
This file was deleted.

wp-content/themes/twentytwentyone/assets/sass/style.scss

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
* Quote................Specific styles for the quote block.
4848
* Search...............Specific styles for the search block.
4949
* Separator............Specific styles for the separator block.
50-
* Spacer...............Specific styles for the spacer block.
5150
* Table................Specific styles for the table block.
5251
* Verse................Specific styles for the verse block.
5352
* Video................Specific styles for the video block.

wp-content/themes/twentytwentyone/style-rtl.css

-13
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ Twenty Twenty-One is distributed under the terms of the GNU GPL.
6666
* Quote................Specific styles for the quote block.
6767
* Search...............Specific styles for the search block.
6868
* Separator............Specific styles for the separator block.
69-
* Spacer...............Specific styles for the spacer block.
7069
* Table................Specific styles for the table block.
7170
* Verse................Specific styles for the verse block.
7271
* Video................Specific styles for the video block.
@@ -3375,18 +3374,6 @@ hr.wp-block-separator.is-style-dots:before {
33753374
background: none;
33763375
}
33773376

3378-
.wp-block-spacer {
3379-
display: block;
3380-
margin-bottom: 0 !important;
3381-
margin-top: 0 !important;
3382-
}
3383-
@media only screen and (max-width: 481px) {
3384-
3385-
.wp-block-spacer[style] {
3386-
height: var(--global--spacing-unit) !important;
3387-
}
3388-
}
3389-
33903377
table,
33913378
.wp-block-table {
33923379
width: 100%;

wp-content/themes/twentytwentyone/style.css

-13
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ Twenty Twenty-One is distributed under the terms of the GNU GPL.
6666
* Quote................Specific styles for the quote block.
6767
* Search...............Specific styles for the search block.
6868
* Separator............Specific styles for the separator block.
69-
* Spacer...............Specific styles for the spacer block.
7069
* Table................Specific styles for the table block.
7170
* Verse................Specific styles for the verse block.
7271
* Video................Specific styles for the video block.
@@ -3385,18 +3384,6 @@ hr.wp-block-separator.is-style-dots:before {
33853384
background: none;
33863385
}
33873386

3388-
.wp-block-spacer {
3389-
display: block;
3390-
margin-bottom: 0 !important;
3391-
margin-top: 0 !important;
3392-
}
3393-
@media only screen and (max-width: 481px) {
3394-
3395-
.wp-block-spacer[style] {
3396-
height: var(--global--spacing-unit) !important;
3397-
}
3398-
}
3399-
34003387
table,
34013388
.wp-block-table {
34023389
width: 100%;

wp-includes/version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @global string $wp_version
1818
*/
19-
$wp_version = '6.1-alpha-54102';
19+
$wp_version = '6.1-alpha-54103';
2020

2121
/**
2222
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)