Skip to content

Commit f567098

Browse files
author
LinuxJava7
committed
use flex for container and tiles
1 parent 395363c commit f567098

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

style.css

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,18 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
143143
.container {
144144
margin: 2rem 0 0;
145145
flex: 1;
146-
display: grid;
147-
gap: 0 var(--grid-gap);
148-
grid-template-columns: [full-start] minmax(0, 1fr) [main-start] repeat(5, minmax(1rem, calc(var(--pagewidth)/5))) [main-end] minmax(0, 1fr) [full-end];
146+
display: flex;
147+
flex-direction: column;
148+
align-items: center;
149149
max-width: var(--max-width);
150150
margin-left: auto;
151151
margin-right: auto;
152+
padding: 0 var(--grid-gap);
152153
}
153154

154-
.container * {
155-
grid-column: main;
155+
.container > * {
156+
width: 100%;
157+
max-width: var(--pagewidth);
156158
}
157159

158160
/* Tiles */
@@ -172,33 +174,22 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
172174
}
173175

174176
.tile {
175-
grid-column: auto;
176-
display: grid;
177+
display: flex;
178+
flex-direction: column;
177179
text-decoration: none;
178180
color: var(--window-fg-color);
179-
grid-template-rows: auto 1fr auto;
180-
align-content: stretch;
181-
align-items: start;
182181
transition: all 300ms var(--slickease);
183-
gap: 0;
184182
margin: 0;
185183
padding: 0;
186184
border-radius: 24px;
187185
background-color: var(--card-bg-color);
188186
color: var(--card-fg-color);
189-
width: 100%;
190187
box-sizing: border-box;
191-
min-width: 0;
192188
overflow: hidden;
193-
194189
flex: 1;
195190
min-width: 350px;
196191
}
197192

198-
.tile * {
199-
grid-column: auto;
200-
}
201-
202193
.tile img {
203194
height: 270px;
204195
object-fit: cover;
@@ -214,6 +205,7 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
214205
gap: 0;
215206
min-width: 0;
216207
padding: 3rem;
208+
flex: 1;
217209
}
218210

219211
.tile h4 {
@@ -510,11 +502,11 @@ footer {
510502
}
511503

512504
.container {
513-
grid-template-columns: [full-start] minmax(0, 1fr) [main-start] repeat(2, minmax(1rem, calc(var(--pagewidth)/2))) [main-end] minmax(0, 1fr) [full-end];
505+
padding: 0 var(--grid-gap);
514506
}
515507

516508
.tiles {
517-
grid-template-columns: 1fr;
509+
padding: 10px;
518510
}
519511

520512
.tile {

0 commit comments

Comments
 (0)