Skip to content

Commit 6b6f270

Browse files
In CSS replaced grid with flexbox in article cards to fix alignment and equal height
1 parent 21f3e13 commit 6b6f270

1 file changed

Lines changed: 19 additions & 18 deletions

File tree

Wireframe/style.css

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
:root {
32
--paper: oklch(7 0 0);
43
--ink: color-mix(in oklab, var(--color) 5%, black);
@@ -8,23 +7,27 @@
87
--container: 1280px;
98
}
109

11-
h1{
10+
h1 {
1211
text-align: center;
13-
}
14-
.description{
12+
}
13+
14+
.description {
1515
text-align: center;
1616

17-
}
17+
}
18+
1819
body {
1920
background: var(--paper);
2021
color: var(--ink);
2122
font: var(--font);
2223
}
24+
2325
a {
2426
padding: var(--space);
2527
border: var(--line);
2628
max-width: fit-content;
2729
}
30+
2831
img,
2932
svg {
3033
width: 100%;
@@ -35,33 +38,31 @@ main {
3538
max-width: var(--container);
3639
margin: 0 auto calc(var(--space) * 4) auto;
3740
}
41+
3842
footer {
39-
position:relative;
43+
position: relative;
4044
bottom: 0;
4145
width: 100%;
42-
color:black;
46+
color: black;
4347
text-align: center;
4448
}
4549

4650
main {
4751
display: grid;
4852
grid-template-columns: 1fr 1fr;
4953
gap: var(--space);
50-
> *:first-child {
54+
55+
>*:first-child {
5156
grid-column: span 2;
5257
}
5358
}
5459

5560
article {
5661
border: var(--line);
57-
padding-bottom: var(--space);
62+
padding: var(--space);
5863
text-align: left;
59-
display: grid;
60-
grid-template-columns: var(--space) 1fr var(--space);
61-
> * {
62-
grid-column: 2/3;
63-
}
64-
> img {
65-
grid-column: span 3;
66-
}
67-
}
64+
65+
display: flex;
66+
flex-direction: column;
67+
justify-content: space-between;
68+
}

0 commit comments

Comments
 (0)