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 29, 2017
1 parent 8562c16 commit 389fc17
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions blocks/library/gallery/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@
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 389fc17

Please sign in to comment.