Modern CSS
OKLCH, container queries, cascade layers, light-dark(), relative color. Locked to the 2026 snapshot. No polyfills.
v2026.1 · OKLCH · no polyfills
Write the HTML spec. It comes out styled, dark-mode aware, and accessible. Reach for hs-* only when the platform is missing a verb.
No classes. The stylesheet styles the tags.
Zero build
A build step is only needed inside another framework, which already has one. ES modules need HTTP, not a bundler — any static server works. Opening from file://? Use the classic script build.
<link rel="stylesheet" href="css/html.style.css">
<script type="module" src="js/html.style.js"></script>
<script type="module" src="js/html.style.components.js"></script>Against utility soup
html.style
<h1>Settings</h1>
<form>
<label for="email">Email</label>
<input id="email" type="email" required>
<button>Save</button>
</form>
Utility CSS
<div class="mx-auto max-w-lg p-8">
<h1 class="text-3xl font-bold tracking-tight">Settings</h1>
<form class="mt-6 flex flex-col gap-4">
<label class="text-sm font-medium text-zinc-600">Email</label>
<input class="rounded-md border border-zinc-300 px-3 py-2" />
<button class="rounded-md bg-zinc-900 px-4 py-2 text-white">Save</button>
</form>
</div>
Additive, not a second vocabulary
<article> is already a styled article. <hs-card> adds container-query padding. <hs-dialog> is a real <dialog> — top layer, backdrop, focus trap, Escape, <form method="dialog"> still close it.
Atoms and layout still work. Light-DOM elements look right before they upgrade. Shadow widgets reserve their box so the layout does not jump.
No. Tags are styled. Classes are opt-in atoms and variants.
The platform does the hard part. This component only opens modal.
Same tokens on <p> and <hs-combobox>.
Theme without a rebuild
One custom property. Surfaces, borders, and text pick up a trace of the same hue. Nothing to rebuild.
OKLCH, container queries, cascade layers, light-dark(), relative color. Locked to the 2026 snapshot. No polyfills.
A generated custom-elements.json, predictable hs-* names, docs written so a coding agent can use the library without extra guidance.
Override tokens on :root or a subtree. Compose layout atoms. Write your own component that still drinks --p-*.