From 8a11188d0f5728bc9bbdf331ff9174d45b1768a6 Mon Sep 17 00:00:00 2001 From: ryelle Date: Tue, 22 Jun 2021 16:55:58 +0000 Subject: [PATCH] Twenty Twenty-One: Add margins around content in Post Template block. Props desrosj, joen. See #53389, #53398. Built from https://develop.svn.wordpress.org/trunk@51201 git-svn-id: http://core.svn.wordpress.org/trunk@50810 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../themes/twentytwentyone/assets/css/ie.css | 16 ++++++++++++++-- .../assets/sass/03-generic/vertical-margins.scss | 3 ++- wp-content/themes/twentytwentyone/style-rtl.css | 12 ++++++++---- wp-content/themes/twentytwentyone/style.css | 12 ++++++++---- wp-includes/version.php | 2 +- 5 files changed, 33 insertions(+), 12 deletions(-) diff --git a/wp-content/themes/twentytwentyone/assets/css/ie.css b/wp-content/themes/twentytwentyone/assets/css/ie.css index f2d07ee480..b0ed396eec 100644 --- a/wp-content/themes/twentytwentyone/assets/css/ie.css +++ b/wp-content/themes/twentytwentyone/assets/css/ie.css @@ -1094,6 +1094,11 @@ template { margin-top: 20px; margin-bottom: 20px; } + +.wp-block-post-template :where(li > *) { + margin-top: 20px; + margin-bottom: 20px; +} @media only screen and (min-width: 482px) { .site-main > article > * { @@ -1120,13 +1125,19 @@ template { margin-top: 30px; margin-bottom: 30px; } + + .wp-block-post-template :where(li > *) { + margin-top: 30px; + margin-bottom: 30px; + } } .site-main > article > *:first-child, .site-main > .not-found > *:first-child, .entry-content > *:first-child, [class*=inner-container] > *:first-child, -.wp-block-template-part > *:first-child { +.wp-block-template-part > *:first-child, +.wp-block-post-template :where(li > *):first-child { margin-top: 0; } @@ -1134,7 +1145,8 @@ template { .site-main > .not-found > *:last-child, .entry-content > *:last-child, [class*=inner-container] > *:last-child, -.wp-block-template-part > *:last-child { +.wp-block-template-part > *:last-child, +.wp-block-post-template :where(li > *):last-child { margin-bottom: 0; } diff --git a/wp-content/themes/twentytwentyone/assets/sass/03-generic/vertical-margins.scss b/wp-content/themes/twentytwentyone/assets/sass/03-generic/vertical-margins.scss index d0f81cf2f3..e6746a37f0 100644 --- a/wp-content/themes/twentytwentyone/assets/sass/03-generic/vertical-margins.scss +++ b/wp-content/themes/twentytwentyone/assets/sass/03-generic/vertical-margins.scss @@ -92,7 +92,8 @@ .site-main > .not-found > *, // apply vertical margins to article level .entry-content > *, [class*="inner-container"] > *, -.wp-block-template-part > * { +.wp-block-template-part > *, +.wp-block-post-template :where(li > *) { // using :where keeps specificity low. margin-top: calc(0.666 * var(--global--spacing-vertical)); margin-bottom: calc(0.666 * var(--global--spacing-vertical)); diff --git a/wp-content/themes/twentytwentyone/style-rtl.css b/wp-content/themes/twentytwentyone/style-rtl.css index 5298ba21f2..ba9ee0bc1e 100644 --- a/wp-content/themes/twentytwentyone/style-rtl.css +++ b/wp-content/themes/twentytwentyone/style-rtl.css @@ -914,7 +914,8 @@ template { .site-main > .not-found > *, .entry-content > *, [class*=inner-container] > *, -.wp-block-template-part > * { +.wp-block-template-part > *, +.wp-block-post-template :where(li > *) { margin-top: calc(0.666 * var(--global--spacing-vertical)); margin-bottom: calc(0.666 * var(--global--spacing-vertical)); } @@ -924,7 +925,8 @@ template { .site-main > .not-found > *, .entry-content > *, [class*=inner-container] > *, - .wp-block-template-part > * { + .wp-block-template-part > *, + .wp-block-post-template :where(li > *) { margin-top: var(--global--spacing-vertical); margin-bottom: var(--global--spacing-vertical); } @@ -934,7 +936,8 @@ template { .site-main > .not-found > *:first-child, .entry-content > *:first-child, [class*=inner-container] > *:first-child, -.wp-block-template-part > *:first-child { +.wp-block-template-part > *:first-child, +.wp-block-post-template :where(li > *):first-child { margin-top: 0; } @@ -942,7 +945,8 @@ template { .site-main > .not-found > *:last-child, .entry-content > *:last-child, [class*=inner-container] > *:last-child, -.wp-block-template-part > *:last-child { +.wp-block-template-part > *:last-child, +.wp-block-post-template :where(li > *):last-child { margin-bottom: 0; } diff --git a/wp-content/themes/twentytwentyone/style.css b/wp-content/themes/twentytwentyone/style.css index 6dcc4045d9..9597bc0e45 100644 --- a/wp-content/themes/twentytwentyone/style.css +++ b/wp-content/themes/twentytwentyone/style.css @@ -922,7 +922,8 @@ template { .site-main > .not-found > *, .entry-content > *, [class*=inner-container] > *, -.wp-block-template-part > * { +.wp-block-template-part > *, +.wp-block-post-template :where(li > *) { margin-top: calc(0.666 * var(--global--spacing-vertical)); margin-bottom: calc(0.666 * var(--global--spacing-vertical)); } @@ -932,7 +933,8 @@ template { .site-main > .not-found > *, .entry-content > *, [class*=inner-container] > *, - .wp-block-template-part > * { + .wp-block-template-part > *, + .wp-block-post-template :where(li > *) { margin-top: var(--global--spacing-vertical); margin-bottom: var(--global--spacing-vertical); } @@ -942,7 +944,8 @@ template { .site-main > .not-found > *:first-child, .entry-content > *:first-child, [class*=inner-container] > *:first-child, -.wp-block-template-part > *:first-child { +.wp-block-template-part > *:first-child, +.wp-block-post-template :where(li > *):first-child { margin-top: 0; } @@ -950,7 +953,8 @@ template { .site-main > .not-found > *:last-child, .entry-content > *:last-child, [class*=inner-container] > *:last-child, -.wp-block-template-part > *:last-child { +.wp-block-template-part > *:last-child, +.wp-block-post-template :where(li > *):last-child { margin-bottom: 0; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 5f36f0c076..4d7228cc63 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.8-beta2-51200'; +$wp_version = '5.8-beta2-51201'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.