Skip to content

Commit 869a935

Browse files
committed
feat: enhance resource card styling with dynamic background colors and hover effects
1 parent 330c10c commit 869a935

1 file changed

Lines changed: 37 additions & 1 deletion

File tree

site/src/components/ContentSections.css

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,46 @@
256256
.resource-card {
257257
@apply relative flex min-h-28 flex-col rounded-xl p-4 pr-10 shadow-md transition hover:-translate-y-0.5 hover:border-cyan-300/40 hover:no-underline;
258258
border: 1px solid var(--border-soft);
259-
background: var(--card-bg-strong);
259+
background: var(--resource-bg, var(--card-bg-strong));
260260
color: var(--text-main);
261261
}
262262

263+
.resource-card:nth-child(1) {
264+
--resource-bg: color-mix(in srgb, var(--card-bg-strong) 82%, rgba(103, 232, 249, 0.22));
265+
}
266+
267+
.resource-card:nth-child(2) {
268+
--resource-bg: color-mix(in srgb, var(--card-bg-strong) 84%, rgba(45, 212, 191, 0.20));
269+
}
270+
271+
.resource-card:nth-child(3) {
272+
--resource-bg: color-mix(in srgb, var(--card-bg-strong) 84%, rgba(167, 139, 250, 0.20));
273+
}
274+
275+
.resource-card:nth-child(4) {
276+
--resource-bg: color-mix(in srgb, var(--card-bg-strong) 84%, rgba(251, 191, 36, 0.20));
277+
}
278+
279+
.resource-card:nth-child(5) {
280+
--resource-bg: color-mix(in srgb, var(--card-bg-strong) 84%, rgba(96, 165, 250, 0.20));
281+
}
282+
283+
.resource-card:nth-child(6) {
284+
--resource-bg: color-mix(in srgb, var(--card-bg-strong) 84%, rgba(244, 114, 182, 0.18));
285+
}
286+
287+
.resource-card:nth-child(7) {
288+
--resource-bg: color-mix(in srgb, var(--card-bg-strong) 84%, rgba(74, 222, 128, 0.18));
289+
}
290+
291+
.resource-card:nth-child(8) {
292+
--resource-bg: color-mix(in srgb, var(--card-bg-strong) 84%, rgba(148, 163, 184, 0.24));
293+
}
294+
295+
.resource-card:hover {
296+
background: color-mix(in srgb, var(--resource-bg, var(--card-bg-strong)) 86%, var(--accent-cta) 14%);
297+
}
298+
263299
.resource-card-label {
264300
@apply text-base font-semibold;
265301
color: var(--text-strong);

0 commit comments

Comments
 (0)