Skip to content

Commit cdd3d6d

Browse files
committed
style: make main grid single column on mobile
1 parent c94f236 commit cdd3d6d

1 file changed

Lines changed: 14 additions & 15 deletions

File tree

Wireframe/style.css

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,26 +65,25 @@ main {
6565
padding: 0 var(--space);
6666
}
6767

68+
main > article:first-child {
69+
grid-column: span 2;
70+
}
71+
72+
@media (max-width: 768px) {
73+
main {
74+
grid-template-columns: 1fr;
75+
}
76+
main > article:first-child {
77+
grid-column: span 1;
78+
}
79+
}
80+
6881
footer {
6982
position: fixed;
7083
bottom: 0;
7184
text-align: center;
7285
}
73-
/* ====== Articles Grid Layout ====
74-
Setting the rules for how articles are placed in the main element.
75-
Inspect this in Devtools and click the "grid" button in the Elements view
76-
Play with the options that come up.
77-
https://developer.chrome.com/docs/devtools/css/grid
78-
https://gridbyexample.com/learn/
79-
*/
80-
main {
81-
display: grid;
82-
grid-template-columns: 1fr 1fr;
83-
gap: var(--space);
84-
> *:first-child {
85-
grid-column: span 2;
86-
}
87-
}
86+
8887
/* ====== Article Layout ======
8988
Setting the rules for how elements are placed in the article.
9089
Now laying out just the INSIDE of the repeated card/article design.

0 commit comments

Comments
 (0)