:root {
--primary: #6366f1;
--secondary: #ec4899;
--surface: oklch(98% 0.01 240);
--text: color-mix(in oklch, black 85%, var(--primary));
--radius: 0.5rem;
--shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}
@container sidebar (min-width: 400px) {
.widget { grid-template-columns: 1fr 1fr; }
}
.card {
padding-block: 1.5rem;
padding-inline: 2rem;
border-radius: var(--radius);
background: var(--surface);
& > h2 {
font-size: clamp(1.25rem, 4vw, 2rem);
text-wrap: balance;
}
&:has(img) { container-type: inline-size; }
&:not(:last-child) { margin-block-end: 1rem; }
}
.layout {
display: grid;
grid-template:
"header header" auto
"nav main" 1fr
"footer footer" auto
/ 250px 1fr;
min-height: 100dvh;
}
@property --gradient-angle {
syntax: "<angle>";
initial-value: 0deg;
inherits: false;
}
@keyframes rotate-gradient {
to { --gradient-angle: 360deg; }
}
.animated-border {
background: conic-gradient(
from var(--gradient-angle),
var(--primary),
var(--secondary),
var(--primary)
);
animation: rotate-gradient 3s linear infinite;
}
input:is([type="email"], [type="url"]):valid {
border-color: oklch(0.7 0.15 145);
}
dialog::backdrop {
background: oklch(0 0 0 / 0.5);
backdrop-filter: blur(4px);
}
@supports (animation-timeline: scroll()) {
.progress-bar {
animation: grow-progress auto linear;
animation-timeline: scroll(root);
}
@keyframes grow-progress {
from { transform: scaleX(0); }
to { transform: scaleX(1); }
}
}
@media (prefers-color-scheme: dark) {
:root {
--surface: oklch(15% 0.02 260);
--text: oklch(95% 0.01 240);
}
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important;
}
}
.form-row {
display: grid;
grid-template-columns: subgrid;
grid-column: span 2;
& label { justify-self: end; }
& input { justify-self: start; }
}
@layer reset, base, components, utilities;
@layer reset {
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, sans-serif; }
}
@layer utilities {
.sr-only {
position: absolute;
width: 1px;
height: 1px;
clip: rect(0, 0, 0, 0);
overflow: hidden;
}
}