Skip to content

Commit 32d9581

Browse files
fallback to grid
1 parent 0b78238 commit 32d9581

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

css-masonry/blog.html

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,19 @@
4848
main {
4949
margin: var(--margin) 0;
5050

51-
display: masonry;
52-
grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
53-
gap: 2rem;
54-
5551
max-width: 1300px;
5652
margin-inline: auto;
5753
padding-inline: var(--margin);
54+
55+
display: grid;
56+
grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
57+
gap: 2rem;
58+
}
59+
60+
@supports (display: masonry) {
61+
main {
62+
display: masonry;
63+
}
5864
}
5965

6066
* {
@@ -63,7 +69,7 @@
6369

6470
h1,
6571
h2 {
66-
font-weight: 200;
72+
font-weight: 400;
6773
}
6874

6975
p {
@@ -157,13 +163,19 @@
157163
color: #616161;
158164
font-size: smaller;
159165
line-height: 1.7;
160-
display: masonry;
166+
display: grid;
161167
grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
162168
gap: 1rem;
163169
padding: var(--margin);
164170
background: #0001;
165171
}
166172

173+
@supports (display: masonry) {
174+
footer {
175+
display: masonry;
176+
}
177+
}
178+
167179
footer ul,
168180
footer li {
169181
list-style: none;

0 commit comments

Comments
 (0)