From ef69d4ba14b4a88fc38e4b5dfe91506fc2509016 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 26 Aug 2019 19:00:46 +0000 Subject: [PATCH] Twenty Nineteen: Make sure center-aligned images in columns do not break beyond the column boundaries. Props kjellr. Fixes #47937. git-svn-id: https://develop.svn.wordpress.org/trunk@45897 602fd350-edb4-49c9-b593-d223f7449a82 --- .../themes/twentynineteen/sass/blocks/_blocks.scss | 3 ++- src/wp-content/themes/twentynineteen/style-rtl.css | 6 ++++-- src/wp-content/themes/twentynineteen/style.css | 6 ++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss b/src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss index 16ae2d3713..e59eb470cd 100644 --- a/src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss +++ b/src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss @@ -788,7 +788,8 @@ } // Ensure images do not expand beyond the column. - .wp-block-image > img:not(.alignwide):not(.alignfull) { + .wp-block-image > img:not(.alignwide):not(.alignfull), + .wp-block-image > figure { @include media(tablet) { max-width: 100%; diff --git a/src/wp-content/themes/twentynineteen/style-rtl.css b/src/wp-content/themes/twentynineteen/style-rtl.css index df10ac4e9d..479a6d6bb3 100644 --- a/src/wp-content/themes/twentynineteen/style-rtl.css +++ b/src/wp-content/themes/twentynineteen/style-rtl.css @@ -6092,13 +6092,15 @@ body.page .main-navigation { } @media only screen and (min-width: 768px) { - .entry .entry-content .wp-block-columns .wp-block-image > img:not(.alignwide):not(.alignfull) { + .entry .entry-content .wp-block-columns .wp-block-image > img:not(.alignwide):not(.alignfull), + .entry .entry-content .wp-block-columns .wp-block-image > figure { max-width: 100%; } } @media only screen and (min-width: 1168px) { - .entry .entry-content .wp-block-columns .wp-block-image > img:not(.alignwide):not(.alignfull) { + .entry .entry-content .wp-block-columns .wp-block-image > img:not(.alignwide):not(.alignfull), + .entry .entry-content .wp-block-columns .wp-block-image > figure { max-width: 100%; } } diff --git a/src/wp-content/themes/twentynineteen/style.css b/src/wp-content/themes/twentynineteen/style.css index 1cc1c0658f..e6d76f0e06 100644 --- a/src/wp-content/themes/twentynineteen/style.css +++ b/src/wp-content/themes/twentynineteen/style.css @@ -6104,13 +6104,15 @@ body.page .main-navigation { } @media only screen and (min-width: 768px) { - .entry .entry-content .wp-block-columns .wp-block-image > img:not(.alignwide):not(.alignfull) { + .entry .entry-content .wp-block-columns .wp-block-image > img:not(.alignwide):not(.alignfull), + .entry .entry-content .wp-block-columns .wp-block-image > figure { max-width: 100%; } } @media only screen and (min-width: 1168px) { - .entry .entry-content .wp-block-columns .wp-block-image > img:not(.alignwide):not(.alignfull) { + .entry .entry-content .wp-block-columns .wp-block-image > img:not(.alignwide):not(.alignfull), + .entry .entry-content .wp-block-columns .wp-block-image > figure { max-width: 100%; } }