Skip to content

Commit 2a4a416

Browse files
authored
Card: Add even spacing to cards (#352)
* Card: Add even spacing * Card: Add variable for spacing * Card: Added displacement to gap to accord for grip gap * Card: Add hover effect to all cards
1 parent 0507e25 commit 2a4a416

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

assets/css/v2/style.css

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ textarea:not([rows]) {
210210
--table-inner-padding: 6px 10px;
211211
--table-color-divider: 0.7 0 0;
212212

213+
/* Cards */
214+
--card-spacing: 1.5rem;
215+
213216
/* Details */
214217
--details-margin: 0.5rem 0rem;
215218

@@ -1542,7 +1545,8 @@ a:hover {
15421545
.card-section {
15431546
display: flex;
15441547
flex-direction: column;
1545-
gap: 1.5rem;
1548+
gap: var(--card-spacing);
1549+
margin-block-end: calc(var(--card-spacing) - var(--flow-gap));
15461550

15471551
&.featured-section {
15481552
/* Hide all the cards past 3 if it is a featured card section */
@@ -1565,7 +1569,7 @@ a:hover {
15651569
&.card-grid {
15661570
display: grid;
15671571
grid-template-columns: repeat(var(--grid-columns), 1fr);
1568-
gap: 1.5rem;
1572+
gap: var(--card-spacing);
15691573

15701574
@media (max-width: 55rem) {
15711575
grid-template-columns: 1fr;
@@ -1607,6 +1611,12 @@ a:hover {
16071611
font-size: var(--font-step-1);
16081612
}
16091613
}
1614+
1615+
&:hover {
1616+
box-shadow: 3px 3px 0px oklch(var(--color-brand) / 0.4);
1617+
text-decoration-color: oklch(var(--color-background));
1618+
border: 1px solid oklch(var(--color-brand) / 0.8);
1619+
}
16101620
}
16111621
}
16121622
}
@@ -1635,12 +1645,6 @@ a:hover {
16351645
}
16361646
}
16371647
}
1638-
1639-
&:hover {
1640-
box-shadow: 3px 3px 0px oklch(var(--color-brand) / 0.4);
1641-
text-decoration-color: oklch(var(--color-background));
1642-
border: 1px solid oklch(var(--color-brand) / 0.8);
1643-
}
16441648
}
16451649
}
16461650
}

0 commit comments

Comments
 (0)