Building a classless theme, element by element
How LunarCSS styles plain HTML with element selectors only, where its decoration comes from when an element has nothing to draw with, and what it gives up to stay out of your way.
5 posts · All tags
How LunarCSS styles plain HTML with element selectors only, where its decoration comes from when an element has nothing to draw with, and what it gives up to stay out of your way.
Windows contrast themes remove background images, and much of LunarCSS is drawn with them. Three fixes keep the theme's shapes visible in the reader's own colours.
LunarCSS wraps the whole theme in one cascade layer, so a site's own CSS overrides it without specificity fights or !important.
LunarCSS defines each colour once with light-dark(), mixes the rest at runtime in oklch, and lets you retheme it by changing two tokens.
The theme never downloads a font. An optional stylesheet self-hosts Space Grotesk and Space Mono, and everything else falls back to system fonts.