Skip to content

Commit 5cc6b3e

Browse files
committed
Widen boxes to optimize linebreaks
1 parent bba6f40 commit 5cc6b3e

File tree

2 files changed

+14
-18
lines changed

2 files changed

+14
-18
lines changed

packages/create-next-app/templates/default/styles/Home.module.css

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,23 +66,22 @@
6666
}
6767

6868
.grid {
69-
display: flex;
70-
align-items: center;
71-
justify-content: center;
72-
flex-wrap: wrap;
73-
max-width: 800px;
69+
display: grid;
70+
align-items: stretch;
71+
gap: 2rem;
72+
grid-template-columns: 1fr 1fr;
73+
width: 100%;
74+
max-width: 720px;
7475
}
7576

7677
.card {
77-
margin: 1rem;
7878
padding: 1.5rem;
7979
text-align: left;
8080
color: inherit;
8181
text-decoration: none;
8282
border: 1px solid #eaeaea;
8383
border-radius: 10px;
8484
transition: color 0.15s ease, border-color 0.15s ease;
85-
max-width: 300px;
8685
}
8786

8887
.card:hover,
@@ -110,8 +109,7 @@
110109

111110
@media (max-width: 600px) {
112111
.grid {
113-
width: 100%;
114-
flex-direction: column;
112+
grid-template-columns: 1fr;
115113
}
116114
}
117115

packages/create-next-app/templates/typescript/styles/Home.module.css

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,23 +66,22 @@
6666
}
6767

6868
.grid {
69-
display: flex;
70-
align-items: center;
71-
justify-content: center;
72-
flex-wrap: wrap;
73-
max-width: 800px;
69+
display: grid;
70+
align-items: stretch;
71+
gap: 2rem;
72+
grid-template-columns: 1fr 1fr;
73+
width: 100%;
74+
max-width: 720px;
7475
}
7576

7677
.card {
77-
margin: 1rem;
7878
padding: 1.5rem;
7979
text-align: left;
8080
color: inherit;
8181
text-decoration: none;
8282
border: 1px solid #eaeaea;
8383
border-radius: 10px;
8484
transition: color 0.15s ease, border-color 0.15s ease;
85-
max-width: 300px;
8685
}
8786

8887
.card:hover,
@@ -110,8 +109,7 @@
110109

111110
@media (max-width: 600px) {
112111
.grid {
113-
width: 100%;
114-
flex-direction: column;
112+
grid-template-columns: 1fr;
115113
}
116114
}
117115

0 commit comments

Comments
 (0)