|
134 | 134 | } |
135 | 135 |
|
136 | 136 | .p-homepage-card { |
137 | | - background-color: #202020; /* dark background */ |
| 137 | + background-color: #202020; |
138 | 138 | padding: 0; |
139 | | - border: 1px solid rgb(255 255 255 / 10%); /* subtle border */ |
| 139 | + border: 1px solid rgb(255 255 255 / 10%); |
140 | 140 | justify-content: space-between; |
141 | 141 | align-items: center; |
142 | 142 | } |
143 | 143 |
|
144 | 144 | .p-homepage-blog-card { |
145 | | - background-color: #202020; /* dark background */ |
146 | | - border: 1px solid rgb(255 255 255 / 10%); /* subtle border */ |
| 145 | + background-color: #202020; |
| 146 | + border: 1px solid rgb(255 255 255 / 10%); |
147 | 147 | padding: 0; |
| 148 | + |
148 | 149 | @media screen and (width < $breakpoint-large) { |
149 | 150 | padding-bottom: 0; |
150 | 151 | } |
151 | 152 |
|
| 153 | + // On small screens Vanilla collapses the image, title and excerpt into a |
| 154 | + // single subgrid column, which overlaps (excerpt over title) on some |
| 155 | + // iOS/Safari builds. Lay the card out with flexbox there instead — medium |
| 156 | + // and large keep Vanilla's equal-height grid (image left / text right) |
| 157 | + // untouched. Qualifying with `&.p-equal-height-row__col` raises specificity |
| 158 | + // above Vanilla's `.p-equal-height-row .p-equal-height-row__col`, so these |
| 159 | + // win without `!important`. |
| 160 | + @media screen and (width < $breakpoint-small) { |
| 161 | + &.p-equal-height-row__col { |
| 162 | + display: flex; |
| 163 | + flex-direction: column; |
| 164 | + // Opt out of the 4-row subgrid span, and stop the card stretching to |
| 165 | + // fill its grid track — otherwise a taller card grows down into the |
| 166 | + // next one and swallows the gap between them. |
| 167 | + grid-row: auto; |
| 168 | + align-self: start; |
| 169 | + } |
| 170 | + |
| 171 | + & + & { |
| 172 | + margin-top: 1.5rem; |
| 173 | + } |
| 174 | + } |
| 175 | + |
152 | 176 | a { |
153 | 177 | color: var(--vf-color-link-default); |
154 | 178 | } |
|
0 commit comments