instagram.css
60 lines
| 1 | .wpcom-instagram-images { |
| 2 | display: grid; |
| 3 | 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 | |
| 17 | .wpcom-instagram-columns-2 a, |
| 18 | .wpcom-instagram-columns-3 a { |
| 19 | display: inline-block; |
| 20 | vertical-align: top; |
| 21 | } |
| 22 | |
| 23 | .wpcom-instagram-columns-2 a { |
| 24 | width: calc(50% - 8px); |
| 25 | } |
| 26 | |
| 27 | .wpcom-instagram-columns-3 a { |
| 28 | width: calc(33.3333% - 8px); |
| 29 | } |
| 30 | |
| 31 | .wpcom-instagram-images .sq-bg-image { |
| 32 | background-position: center; |
| 33 | background-repeat: no-repeat; |
| 34 | background-size: cover; |
| 35 | height: 0; |
| 36 | overflow: hidden; |
| 37 | padding-bottom: 100%; |
| 38 | } |
| 39 | |
| 40 | .wpcom-instagram-columns-2 { |
| 41 | grid-template-columns: repeat(2, 1fr); |
| 42 | } |
| 43 | |
| 44 | .wpcom-instagram-columns-3 { |
| 45 | grid-template-columns: repeat(3, 1fr); |
| 46 | } |
| 47 | |
| 48 | @supports (display:grid) { |
| 49 | |
| 50 | .wpcom-instagram-images a { |
| 51 | display: block; |
| 52 | margin: 0; |
| 53 | } |
| 54 | |
| 55 | .wpcom-instagram-columns-2 a, |
| 56 | .wpcom-instagram-columns-3 a { |
| 57 | width: auto; |
| 58 | } |
| 59 | } |
| 60 |