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.

git-svn-id: https://develop.svn.wordpress.org/trunk@54103 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov authored and pbearne committed Sep 9, 2022
1 parent 1a35adf commit 62edad0
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 56 deletions.
13 changes: 0 additions & 13 deletions src/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

Large diffs are not rendered by default.

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.

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 src/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 src/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 src/wp-content/themes/twentytwentyone/style.css.map

Large diffs are not rendered by default.

0 comments on commit 62edad0

Please sign in to comment.