Fix display of full width images. Fix left/right aligned galleries.

This commit is contained in:
alaczek 2018-05-28 13:53:18 +10:00
parent 066786fc39
commit e61693023a
2 changed files with 14 additions and 13 deletions

View file

@ -16,12 +16,6 @@
clear: both;
}
.alignfull {
margin-left: -4%;
margin-right: -4%;
max-width: 110%;
}
/* Text-based blocks with alignfull */
.wp-block-text-columns.alignfull,
.wp-block-preformatted.alignfull,
@ -37,10 +31,9 @@ p.alignfull {
@media (min-width: 750px) {
.alignfull {
margin-left: calc(50% - 50vw);
margin-right: calc(50% - 50vw);
width: auto;
max-width: 1000%;
width: 100vw;
max-width: 100vw;
margin: 2rem calc((100% - 100vw) * .5);
}
.alignwide {
@ -105,8 +98,18 @@ p.alignfull {
.wp-block-image {
display: inline-block; /* helps with smaller, unaligned images */
}
.wp-block-image img {
display: block;
width: 100%;
}
.wp-block-image.alignwide {}
.wp-block-image.alignfull {}
.wp-block-image.alignfull {
width: 100vw;
max-width: 100vw;
margin: 2rem calc((100% - 100vw) * .5);
}
.wp-block-image figcaption {
color: inherit;

View file

@ -982,13 +982,11 @@ textarea {
# Alignments
--------------------------------------------------------------*/
.alignleft {
display: inline;
float: left;
margin-right: 1.6em;
}
.alignright {
display: inline;
float: right;
margin-left: 1.6em;
}