instagram.css
56 lines
| 1 | .wpcom-instagram-images { |
| 2 | display: grid; |
| 3 | grid-gap: 0.5rem; |
| 4 | grid-auto-columns: 1fr; |
| 5 | } |
| 6 | |
| 7 | .wpcom-instagram-images:before, |
| 8 | .wpcom-instagram-images:after { |
| 9 | content: none; |
| 10 | } |
| 11 | |
| 12 | .wpcom-instagram-images a { |
| 13 | display: block; |
| 14 | margin: 4px 2px; |
| 15 | } |
| 16 | .wpcom-instagram-columns-2 a, |
| 17 | .wpcom-instagram-columns-3 a { |
| 18 | display: inline-block; |
| 19 | vertical-align: top; |
| 20 | } |
| 21 | .wpcom-instagram-columns-2 a { |
| 22 | width: calc(50% - 8px); |
| 23 | } |
| 24 | .wpcom-instagram-columns-3 a { |
| 25 | width: calc(33.3333% - 8px); |
| 26 | } |
| 27 | |
| 28 | .wpcom-instagram-images .sq-bg-image { |
| 29 | background-position: center; |
| 30 | background-repeat: no-repeat; |
| 31 | background-size: cover; |
| 32 | height: 0; |
| 33 | overflow: hidden; |
| 34 | padding-bottom: 100%; |
| 35 | } |
| 36 | |
| 37 | .wpcom-instagram-columns-2 { |
| 38 | grid-template-columns: repeat(2, 1fr); |
| 39 | } |
| 40 | |
| 41 | .wpcom-instagram-columns-3 { |
| 42 | grid-template-columns: repeat(3, 1fr); |
| 43 | } |
| 44 | |
| 45 | @supports (display:grid) { |
| 46 | .wpcom-instagram-images a { |
| 47 | display: block; |
| 48 | margin: 0; |
| 49 | } |
| 50 | |
| 51 | .wpcom-instagram-columns-2 a, |
| 52 | .wpcom-instagram-columns-3 a { |
| 53 | width: auto; |
| 54 | } |
| 55 | } |
| 56 |