Skip to content

Commit

Permalink
Crop gallery images by default
Browse files Browse the repository at this point in the history
This is a work in progress. Pushing so as to test in IE.
  • Loading branch information
jasmussen committed Jun 28, 2017
1 parent d6b29f6 commit 17b13d9
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion blocks/library/gallery/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,29 @@

&:not( .components-placeholder ) {
margin-right: -16px;
margin-bottom: -16px;
margin-bottom: -16px;
}

// Cropped by default
.blocks-gallery-image {
flex-grow: 1;
margin: 0 16px 16px 0;

img {
width: 100%;
height: 100%;
object-fit: cover;
}

// IE10+ hack
_:-ms-lang(x), img {
height: auto;
width: auto;
}
}

/*
// Uncropped
.blocks-gallery-image {
flex-grow: 1;
margin: 0 16px 16px 0;
Expand All @@ -16,6 +36,7 @@
max-width: 100%;
}
}
*/

&.columns-1 figure {
width: calc(100% / 1 - 2 * 8px);
Expand Down

0 comments on commit 17b13d9

Please sign in to comment.