Skip to content

Commit

Permalink
Twenty Twenty-One: Remove spacer block styles.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
SergeyBiryukov authored and SergeyBiryukov committed Sep 8, 2022
1 parent 9964dff commit eb20df9
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 55 deletions.
13 changes: 0 additions & 13 deletions wp-content/themes/twentytwentyone/assets/css/ie.css
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion wp-content/themes/twentytwentyone/assets/sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
13 changes: 0 additions & 13 deletions wp-content/themes/twentytwentyone/style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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%;
Expand Down
13 changes: 0 additions & 13 deletions wp-content/themes/twentytwentyone/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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%;
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit eb20df9

Please sign in to comment.