A classless stylesheet

Websites that feel a little more human

Drop in one stylesheet, write plain HTML, and get soft gradients, warm paper, serif headlines and pill buttons. No classes required.

Get started See elements

Getting started

One line. That's the whole setup.

Add the stylesheet to the <head> of any page. Everything else is just the HTML you already know how to write.

<link rel="stylesheet" href="yearn.css">

Or straight from a CDN, no download needed:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/immannino/yearn.css@0.1.0/dist/yearn.min.css">

Want a different palette? Load a theme after it. A theme is just a handful of CSS variables, so you can write your own from themes/_template.css.

<link rel="stylesheet" href="yearn.css">
<link rel="stylesheet" href="themes/dusk.css">

Fine-tune the mood with attributes on <html> — or try the panel in the corner. Press ⌘ K to imagine a command bar.

<html data-theme="dark" data-gradient="creamsicle" data-accent="pink">
Themes

Same shapes, different weather

Every theme sets its own paper, ink, accent and hero gradient — in both light and dark mode. Pick one to restyle this whole page.

Default

Warm Gatsby-white paper, black ink, internet blue.

Mint

Sage paper, forest ink and a fresh green accent.

Dusk

Lavender paper, plum ink, a lilac-to-peach sky.

Ember

Toasted cream, espresso ink, signal red.

Tide

Cool slate, navy ink, teal and seafoam.

Mono

Newsprint greys and a serif body. Quiet and editorial.

Candy

Pink paper, magenta accent, a loud diagonal hero and rounder corners.

Arc

After the Arc Resource Center: heavy blue headlines, red buttons, grainy color blocks.

ShareBuilder

Navy, green and sky blue with Work Sans headings. Yellow buttons in dark mode.

Features

Calm by default, playful on purpose

Put two or more <article>s in a <section> and they become a responsive card grid.

Illustration of a browser window floating over a pastel gradient

Inset hero

Your <header> becomes a rounded, grainy gradient panel set inside the page — like a webview inside its window.

01 — Type

Serif headlines

Newsreader for display, Inter for reading, DM Mono for the little uppercase labels that hold it all together.

Swap fonts with three CSS variables.
02 — Color

Six gradients

Cotton candy, creamsicle, grapefruit, sunshine, midnight and plain. Add data-gradient to any element.

03 — Dark mode

Follows the OS

Warm charcoal instead of pure black. Force either theme with data-theme.

04 — Forms

Friendly inputs

Soft focus rings, custom checkboxes, switches, a pill search bar and a rainbow progress bar.

05 — Accessible

Dotted focus

Keyboard focus gets a dotted ring. Reduced-motion users get no animation at all.

Typography

Words first

The reading column sits at a comfortable 44rem. Body copy is set in Inter at 17px with generous leading, while emphasis, inline links, highlighted passages, CSS abbreviations, inline code, deleted and inserted text, H2O and E = mc2 all have a considered look.

Heading one

Heading two, the section title

Heading three for cards and sub-sections

Heading four, a sans-serif subhead

Heading five — eyebrow label
Heading six — muted label

We want the internet to feel less like a place you go to get things done, and more like a place you live.

— Someone who builds browsers

Lists

  1. Ordered lists use mono numerals
  2. That line up neatly
  3. Like a little spec sheet
Definition term
The description sits in a quieter tone beneath it.
Another term
Handy for glossaries, metadata and FAQs.

Code

<section>
  <h2>Pricing</h2>
  <article><h3>Free</h3><p>For tinkering.</p></article>
  <article><h3>Pro</h3><p>For shipping.</p></article>
</section>
Illustration of a browser window floating over a pastel gradient
Figure 1 — Images get soft corners and a mono caption

Tables

What's in the box (sizes from npm run build)
FileWhat it isSize
yearn.cssReadable source, loads Google Fonts42 KB
dist/yearn.min.cssMinified, loads Google Fonts7.0 KB gz
dist/yearn.core.min.cssMinified, bring your own fonts6.9 KB gz
themes/*.cssOne palette each, light + dark0.2–1.1 KB gz
Forms

Inputs that feel nice to touch

Preferences
64% 70%
FAQ

Questions, answered

Do I really not need any classes?

Really. Everything is keyed off semantic elements, with a few optional attributes like role="button" and data-gradient.

Can I change the fonts and colors?

Every value is a CSS custom property prefixed with --y-. Override them in your own stylesheet after yearn.css.

Does it work without JavaScript?

Yes. The only script on this page powers the demo panel and the dialog button below.

Hello there 👋

Dialogs get a soft blurred backdrop and a gentle pop-in animation.

Tweak