diff --git a/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss b/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss index 72822b1263..7c843a13c6 100644 --- a/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss +++ b/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss @@ -505,20 +505,40 @@ //! Image .wp-block-image { + max-width: 100%; img { display: block; } - &.alignleft, - &.alignright { - max-width: 100%; + .aligncenter { + + @include postContentMaxWidth(); + + @include media(tablet) { + margin: 0; + width: $size__site-tablet-content; + + img { + margin: 0 auto; + } + } + + @include media(desktop) { + width: $size__site-desktop-content; + + img { + margin: 0 auto; + } + } } &.alignfull img { width: 100vw; + max-width: calc( 100% + (2 * #{$size__spacing-unit})); @include media(tablet) { + max-width: calc( 125% + 150px ); margin-left: auto; margin-right: auto; } diff --git a/wp-content/themes/twentynineteen/style-rtl.css b/wp-content/themes/twentynineteen/style-rtl.css index 96b35277d1..d86d83bf28 100644 --- a/wp-content/themes/twentynineteen/style-rtl.css +++ b/wp-content/themes/twentynineteen/style-rtl.css @@ -3982,20 +3982,53 @@ body.page .main-navigation { } } +.entry .entry-content .wp-block-image { + max-width: 100%; +} + .entry .entry-content .wp-block-image img { display: block; } -.entry .entry-content .wp-block-image.alignleft, .entry .entry-content .wp-block-image.alignright { - max-width: 100%; +@media only screen and (min-width: 768px) { + .entry .entry-content .wp-block-image .aligncenter { + max-width: calc(8 * (100vw / 12) - 28px); + } +} + +@media only screen and (min-width: 1168px) { + .entry .entry-content .wp-block-image .aligncenter { + max-width: calc(6 * (100vw / 12) - 28px); + } +} + +@media only screen and (min-width: 768px) { + .entry .entry-content .wp-block-image .aligncenter { + margin: 0; + width: calc(8 * (100vw / 12) - 28px); + } + .entry .entry-content .wp-block-image .aligncenter img { + margin: 0 auto; + } +} + +@media only screen and (min-width: 1168px) { + .entry .entry-content .wp-block-image .aligncenter { + width: calc(6 * (100vw / 12) - 28px); + } + .entry .entry-content .wp-block-image .aligncenter img { + margin: 0 auto; + } } .entry .entry-content .wp-block-image.alignfull img { width: 100vw; + max-width: calc( 100% + (2 * 1rem)); } @media only screen and (min-width: 768px) { .entry .entry-content .wp-block-image.alignfull img { + max-width: calc( 125% + 150px); margin-right: auto; margin-left: auto; } diff --git a/wp-content/themes/twentynineteen/style.css b/wp-content/themes/twentynineteen/style.css index 6dd78f0616..06c0717cee 100644 --- a/wp-content/themes/twentynineteen/style.css +++ b/wp-content/themes/twentynineteen/style.css @@ -3994,20 +3994,53 @@ body.page .main-navigation { } } +.entry .entry-content .wp-block-image { + max-width: 100%; +} + .entry .entry-content .wp-block-image img { display: block; } -.entry .entry-content .wp-block-image.alignleft, .entry .entry-content .wp-block-image.alignright { - max-width: 100%; +@media only screen and (min-width: 768px) { + .entry .entry-content .wp-block-image .aligncenter { + max-width: calc(8 * (100vw / 12) - 28px); + } +} + +@media only screen and (min-width: 1168px) { + .entry .entry-content .wp-block-image .aligncenter { + max-width: calc(6 * (100vw / 12) - 28px); + } +} + +@media only screen and (min-width: 768px) { + .entry .entry-content .wp-block-image .aligncenter { + margin: 0; + width: calc(8 * (100vw / 12) - 28px); + } + .entry .entry-content .wp-block-image .aligncenter img { + margin: 0 auto; + } +} + +@media only screen and (min-width: 1168px) { + .entry .entry-content .wp-block-image .aligncenter { + width: calc(6 * (100vw / 12) - 28px); + } + .entry .entry-content .wp-block-image .aligncenter img { + margin: 0 auto; + } } .entry .entry-content .wp-block-image.alignfull img { width: 100vw; + max-width: calc( 100% + (2 * 1rem)); } @media only screen and (min-width: 768px) { .entry .entry-content .wp-block-image.alignfull img { + max-width: calc( 125% + 150px); margin-left: auto; margin-right: auto; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 938ecdf97f..ec330a504d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0.3-alpha-44427'; +$wp_version = '5.0.3-alpha-44428'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.