From ac7877ce6fabd46b166485cfd3c89c0609c1bc0c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 24 Apr 2019 18:37:52 +0000 Subject: [PATCH] Twenty Nineteen: Fix padding discrepancies in responsive styles for Column block. Props kjellr, dianeco. Fixes #46643, #46999. Built from https://develop.svn.wordpress.org/trunk@45264 git-svn-id: http://core.svn.wordpress.org/trunk@45073 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../twentynineteen/sass/blocks/_blocks.scss | 39 ++++++------------- .../themes/twentynineteen/style-rtl.css | 30 ++++---------- wp-content/themes/twentynineteen/style.css | 30 ++++---------- wp-includes/version.php | 2 +- 4 files changed, 28 insertions(+), 73 deletions(-) diff --git a/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss b/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss index 34ec126231..034a16378a 100644 --- a/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss +++ b/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss @@ -741,39 +741,22 @@ //! Columns .wp-block-columns { - &.alignfull { - padding-left: $size__spacing-unit; - padding-right: $size__spacing-unit; - } + .wp-block-column > * { - @include media(mobile) { - flex-wrap: nowrap; + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } } @include media(tablet) { - .wp-block-column > * { + flex-wrap: nowrap; - &:first-child { - margin-top: 0; - } - - &:last-child { - margin-bottom: 0; - } - } - - &[class*='has-'] > * { - margin-right: $size__spacing-unit; - - &:last-child { - margin-right: 0; - } - } - - &.alignfull, - &.alignfull .wp-block-column { - padding-left: calc(2 * #{$size__spacing-unit}); - padding-right: calc(2 * #{$size__spacing-unit}); + .wp-block-column:not(:first-child) { + margin-left: 32px; } } } diff --git a/wp-content/themes/twentynineteen/style-rtl.css b/wp-content/themes/twentynineteen/style-rtl.css index 574999e45f..491d3b94ab 100644 --- a/wp-content/themes/twentynineteen/style-rtl.css +++ b/wp-content/themes/twentynineteen/style-rtl.css @@ -6029,34 +6029,20 @@ body.page .main-navigation { word-break: break-word; } -.entry .entry-content .wp-block-columns.alignfull { - padding-right: 1rem; - padding-left: 1rem; +.entry .entry-content .wp-block-columns .wp-block-column > *:first-child { + margin-top: 0; } -@media only screen and (min-width: 600px) { - .entry .entry-content .wp-block-columns { - flex-wrap: nowrap; - } +.entry .entry-content .wp-block-columns .wp-block-column > *:last-child { + margin-bottom: 0; } @media only screen and (min-width: 768px) { - .entry .entry-content .wp-block-columns .wp-block-column > *:first-child { - margin-top: 0; + .entry .entry-content .wp-block-columns { + flex-wrap: nowrap; } - .entry .entry-content .wp-block-columns .wp-block-column > *:last-child { - margin-bottom: 0; - } - .entry .entry-content .wp-block-columns[class*='has-'] > * { - margin-left: 1rem; - } - .entry .entry-content .wp-block-columns[class*='has-'] > *:last-child { - margin-left: 0; - } - .entry .entry-content .wp-block-columns.alignfull, - .entry .entry-content .wp-block-columns.alignfull .wp-block-column { - padding-right: calc(2 * 1rem); - padding-left: calc(2 * 1rem); + .entry .entry-content .wp-block-columns .wp-block-column:not(:first-child) { + margin-right: 32px; } } diff --git a/wp-content/themes/twentynineteen/style.css b/wp-content/themes/twentynineteen/style.css index a4ed8b331e..3c891822a6 100644 --- a/wp-content/themes/twentynineteen/style.css +++ b/wp-content/themes/twentynineteen/style.css @@ -6041,34 +6041,20 @@ body.page .main-navigation { word-break: break-word; } -.entry .entry-content .wp-block-columns.alignfull { - padding-left: 1rem; - padding-right: 1rem; +.entry .entry-content .wp-block-columns .wp-block-column > *:first-child { + margin-top: 0; } -@media only screen and (min-width: 600px) { - .entry .entry-content .wp-block-columns { - flex-wrap: nowrap; - } +.entry .entry-content .wp-block-columns .wp-block-column > *:last-child { + margin-bottom: 0; } @media only screen and (min-width: 768px) { - .entry .entry-content .wp-block-columns .wp-block-column > *:first-child { - margin-top: 0; + .entry .entry-content .wp-block-columns { + flex-wrap: nowrap; } - .entry .entry-content .wp-block-columns .wp-block-column > *:last-child { - margin-bottom: 0; - } - .entry .entry-content .wp-block-columns[class*='has-'] > * { - margin-right: 1rem; - } - .entry .entry-content .wp-block-columns[class*='has-'] > *:last-child { - margin-right: 0; - } - .entry .entry-content .wp-block-columns.alignfull, - .entry .entry-content .wp-block-columns.alignfull .wp-block-column { - padding-left: calc(2 * 1rem); - padding-right: calc(2 * 1rem); + .entry .entry-content .wp-block-columns .wp-block-column:not(:first-child) { + margin-left: 32px; } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 93c5aff243..0ff9e9fde6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.2-beta3-45263'; +$wp_version = '5.2-beta3-45264'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.