Twenty Nineteen: Push right-aligned image block outside of text column.
Update right-aligned image block styles to push them outside of the text column on the front end, to match the original design and how the block looks in the editor. Props kjellr, joen, allancole. Fixes #45716. git-svn-id: https://develop.svn.wordpress.org/trunk@44371 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ebe82fa034
commit
c9e45cde8b
@ -505,20 +505,40 @@
|
|||||||
|
|
||||||
//! Image
|
//! Image
|
||||||
.wp-block-image {
|
.wp-block-image {
|
||||||
|
max-width: 100%;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.alignleft,
|
.aligncenter {
|
||||||
&.alignright {
|
|
||||||
max-width: 100%;
|
@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 {
|
&.alignfull img {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
|
max-width: calc( 100% + (2 * #{$size__spacing-unit}));
|
||||||
|
|
||||||
@include media(tablet) {
|
@include media(tablet) {
|
||||||
|
max-width: calc( 125% + 150px );
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
@ -3944,20 +3944,53 @@ body.page .main-navigation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.entry .entry-content .wp-block-image {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.entry .entry-content .wp-block-image img {
|
.entry .entry-content .wp-block-image img {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.entry .entry-content .wp-block-image.alignleft, .entry .entry-content .wp-block-image.alignright {
|
@media only screen and (min-width: 768px) {
|
||||||
max-width: 100%;
|
.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 {
|
.entry .entry-content .wp-block-image.alignfull img {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
|
max-width: calc( 100% + (2 * 1rem));
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 768px) {
|
@media only screen and (min-width: 768px) {
|
||||||
.entry .entry-content .wp-block-image.alignfull img {
|
.entry .entry-content .wp-block-image.alignfull img {
|
||||||
|
max-width: calc( 125% + 150px);
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
|
@ -3956,20 +3956,53 @@ body.page .main-navigation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.entry .entry-content .wp-block-image {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.entry .entry-content .wp-block-image img {
|
.entry .entry-content .wp-block-image img {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.entry .entry-content .wp-block-image.alignleft, .entry .entry-content .wp-block-image.alignright {
|
@media only screen and (min-width: 768px) {
|
||||||
max-width: 100%;
|
.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 {
|
.entry .entry-content .wp-block-image.alignfull img {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
|
max-width: calc( 100% + (2 * 1rem));
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 768px) {
|
@media only screen and (min-width: 768px) {
|
||||||
.entry .entry-content .wp-block-image.alignfull img {
|
.entry .entry-content .wp-block-image.alignfull img {
|
||||||
|
max-width: calc( 125% + 150px);
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user