Skip to content

Commit 945619c

Browse files
committed
Twenty Twenty One: Fix editor spacing with inner blocks.
Fix margin on inner blocks (e.g. list item blocks) and body line-height in the editor styles for Twenty Twenty One. Props nidhidhandhukiya, rishabhwp, shailu25, ugyensupport, sabernhardt, karmatosed, sandeepdahiya, mleraygp, sirlouen, skithund, dilip2615. Fixes #60196, #63549. git-svn-id: https://develop.svn.wordpress.org/trunk@61106 602fd350-edb4-49c9-b593-d223f7449a82
1 parent dac5fa8 commit 945619c

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2331,7 +2331,7 @@ pre.wp-block-verse {
23312331
color: #28303d;
23322332
}
23332333

2334-
[data-block] {
2334+
[data-block]:where(:not(.wp-block-list-item)) {
23352335
margin-top: 30px;
23362336
margin-bottom: 30px;
23372337
}
@@ -2439,13 +2439,10 @@ pre.wp-block-verse {
24392439
left: 5px;
24402440
}
24412441

2442-
html {
2443-
line-height: 1.7;
2444-
}
2445-
24462442
html,
24472443
body {
24482444
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
2445+
line-height: 1.7;
24492446
}
24502447

24512448
body {

src/wp-content/themes/twentytwentyone/assets/css/ie-editor.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/wp-content/themes/twentytwentyone/assets/css/style-editor.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2268,7 +2268,7 @@ pre.wp-block-verse {
22682268
color: var(--global--color-primary);
22692269
}
22702270

2271-
[data-block] {
2271+
[data-block]:where(:not(.wp-block-list-item)) {
22722272
margin-top: var(--global--spacing-vertical);
22732273
margin-bottom: var(--global--spacing-vertical);
22742274
}
@@ -2340,6 +2340,7 @@ body {
23402340
font-family: var(--global--font-secondary);
23412341
font-size: var(--global--font-size-base);
23422342
font-weight: normal;
2343+
line-height: var(--global--line-height-body);
23432344
-moz-osx-font-smoothing: grayscale;
23442345
-webkit-font-smoothing: antialiased;
23452346
}

src/wp-content/themes/twentytwentyone/assets/css/style-editor.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
}
7171

7272
// Spacing Overrides
73-
[data-block] {
73+
[data-block]:where(:not(.wp-block-list-item)) {
7474
margin-top: var(--global--spacing-vertical);
7575
margin-bottom: var(--global--spacing-vertical);
7676
}

src/wp-content/themes/twentytwentyone/assets/sass/06-components/editor.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ body {
1010
font-family: var(--global--font-secondary);
1111
font-size: var(--global--font-size-base);
1212
font-weight: normal;
13+
line-height: var(--global--line-height-body);
1314
-moz-osx-font-smoothing: grayscale;
1415
-webkit-font-smoothing: antialiased;
1516
}

0 commit comments

Comments
 (0)