LAYOUT / 001
Container queries
This card responds to the width of its parent, not the viewport.
Browser APIs · CSS · edge functions
CSS experimentsWEB PLATFORM / FIELD NOTES 001
A local workspace for testing browser standards, expressive CSS, and edge-ready TypeScript patterns.
01 / COLOR SYSTEM
const palettes = {
spring: "oklch(72% 0.16 151)",
summer: "oklch(78% 0.15 75)",
autumn: "oklch(73% 0.17 38)",
winter: "oklch(75% 0.14 224)",
};
const month = new Date().getUTCMonth();
const season =
month >= 2 && month <= 4 ? "spring" :
month >= 5 && month <= 7 ? "summer" :
month >= 8 && month <= 10 ? "autumn" : "winter";
document.documentElement.style.setProperty("--theme-accent", palettes[season]);
02 / RESPONSIVE LAYOUT
LAYOUT / 001
This card responds to the width of its parent, not the viewport.
LAYOUT / 002
Shared tracks keep headings, descriptions, and details in line.
.card-list {
container-type: inline-size;
}
.card {
display: grid;
grid-template-columns: 8rem 1fr;
}
@container (max-width: 32rem) {
.card {
grid-template-columns: 1fr;
}
}
.cards {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: auto auto auto;
}
.card {
display: grid;
grid-row: span 3;
grid-template-rows: subgrid;
}
03 / HTML INTERACTION
The dialog provides focus management, a modal backdrop, and Escape handling through the native element.
<dialog id="notice">
<p>Your changes are saved.</p>
<form method="dialog">
<button>Close</button>
</form>
</dialog>
<button id="open-notice">Open dialog</button>
<script>
document.querySelector("#open-notice")
.addEventListener("click", () => {
document.querySelector("#notice").showModal();
});
</script>
04 / RELATIONAL SELECTORS
<label class="field">
Email
<input type="email" required>
</label>
.field:has(input:user-invalid) {
color: crimson;
}
.field:has(input:user-valid) {
color: seagreen;
}
05 / COLOR INSPECTION
:root {
--accent: oklch(72% 0.16 151);
--surface: oklch(20% 0.02 255);
}
.button {
background: var(--accent);
color: var(--surface);
}