One class. Not forty.

mCSS is a modern CSS framework and component library for websites. Real CSS, real markup, zero build step. Built on what browsers can finally do.

Get started View on GitHub

MIT licensed · No dependencies · It’s just CSS

Two mCSS classes replace forty utility classes: the same rendered button, from markup you can read.

<link rel="stylesheet" href="mcss.min.css">
Copied!

That’s the install. Download dist/mcss.min.css or copy the source files. Every modern browser understands them as-is: no compiler, no config, no node_modules.

Philosophy

Made for humans who write CSS

CSS isn’t broken, and you don’t need to be protected from it. mCSS takes care of the tedious parts (resets, tokens, a sane cascade) and gets out of the way.

Modern CSS

Built on what browsers can do now

The last few years quietly made CSS spectacular. mCSS is what a framework looks like when it’s designed after that happened.

Every technique is documented on the blog. The framework practices what it teaches. Read the blog →

Theming

Theme with variables, not variants

Every color, size, and radius flows from one token file. Edit it and the whole system follows, light and dark.

Pick a demo theme

Game night

Friday 8pm at Maria’s place

Bring a snack and your best poker face. Newcomers welcome.

We’ll never share it. Please fill out this field correctly.
/* settings.theme.default.css, as shipped */
:root {
  --heading-font: var(--display);
  --text-color: light-dark(#23282e, #d6dbe1);
  --card-bg-color: light-dark(#edeef1, #353c45);
  --card-border-radius: 8px;
  --card-shadow: var(--shadow-md);
  --bt-primary-background-color: #0284c7;
  --bt-primary-background-color-hover: #0ea5e9;
  --bt-primary-border-color: #0284c7;
  --bt-primary-border-color-hover: #0284c7;
  --bt-border-radius: 8px;
  --input-border-radius: 5px;
  --link-color: light-dark(#0284c7, #38bdf8);
}
/* wireframe: the entire diff */
:root {
  --heading-font: ui-rounded, "Arial Rounded MT Bold", Calibri, sans-serif;
  --text-color: light-dark(#404040, #d4d4d4);
  --card-bg-color: light-dark(#f5f5f5, #171717);
  --card-border-radius: 0;
  --card-shadow: none;
  --bt-primary-background-color: #525252;
  --bt-primary-background-color-hover: #737373;
  --bt-primary-border-color: #525252;
  --bt-primary-border-color-hover: #525252;
  --bt-border-radius: 0;
  --input-border-radius: 0;
  --link-color: light-dark(#525252, #a3a3a3);
}
/* sunset: the entire diff */
:root {
  --heading-font: "Iowan Old Style", Georgia, serif;
  --text-color: light-dark(#431407, #ffedd5);
  --card-bg-color: light-dark(#fff7ed, #431407);
  --card-border-radius: 16px;
  --card-shadow: 0 8px 24px rgb(234 88 12 / 0.25);
  --bt-primary-background-color: #ea580c;
  --bt-primary-background-color-hover: #f97316;
  --bt-primary-border-color: #ea580c;
  --bt-primary-border-color-hover: #ea580c;
  --bt-border-radius: 1e5px;
  --input-border-radius: 1e5px;
  --link-color: light-dark(#c2410c, #fb923c);
}
Show the diff
/* settings.theme.default.css, as shipped */
:root {
  --heading-font: var(--display);
  --text-color: light-dark(#23282e, #d6dbe1);
  --card-bg-color: light-dark(#edeef1, #353c45);
  --card-border-radius: 8px;
  --card-shadow: var(--shadow-md);
  --bt-primary-background-color: #0284c7;
  --bt-primary-background-color-hover: #0ea5e9;
  --bt-primary-border-color: #0284c7;
  --bt-primary-border-color-hover: #0284c7;
  --bt-border-radius: 8px;
  --input-border-radius: 5px;
  --link-color: light-dark(#0284c7, #38bdf8);
}
/* wireframe: the entire diff */
:root {
  --heading-font: ui-rounded, "Arial Rounded MT Bold", Calibri, sans-serif;
  --text-color: light-dark(#404040, #d4d4d4);
  --card-bg-color: light-dark(#f5f5f5, #171717);
  --card-border-radius: 0;
  --card-shadow: none;
  --bt-primary-background-color: #525252;
  --bt-primary-background-color-hover: #737373;
  --bt-primary-border-color: #525252;
  --bt-primary-border-color-hover: #525252;
  --bt-border-radius: 0;
  --input-border-radius: 0;
  --link-color: light-dark(#525252, #a3a3a3);
}
/* sunset: the entire diff */
:root {
  --heading-font: "Iowan Old Style", Georgia, serif;
  --text-color: light-dark(#431407, #ffedd5);
  --card-bg-color: light-dark(#fff7ed, #431407);
  --card-border-radius: 16px;
  --card-shadow: 0 8px 24px rgb(234 88 12 / 0.25);
  --bt-primary-background-color: #ea580c;
  --bt-primary-background-color-hover: #f97316;
  --bt-primary-border-color: #ea580c;
  --bt-primary-border-color-hover: #ea580c;
  --bt-border-radius: 1e5px;
  --input-border-radius: 1e5px;
  --link-color: light-dark(#c2410c, #fb923c);
}

Radio buttons and :has(): this demo runs on zero JavaScript.

Component library

Components for real websites

Header to footer: heroes, sections, feature grids, pricing, testimonials, FAQs, forms, article lists, pagination. Built for marketing sites, blogs, and docs. Ships as plain HTML or Astro, whichever you write.

Nearly everything is zero-JavaScript. The mobile menu and the dismissible banner are the exceptions, and they’re tiny.

Start from a whole site, not a blank file.

This site (the docs, the blog, and the page you’re reading) is built from the same library. Browse the components →

Ownership

You own the code

mCSS isn’t a dependency. It’s a starting point. Copy the files into your project and edit them like the code you wrote yourself, because now it is. Styling disagreements end with you changing a line, not filing an issue.

MIT licensed. Versioned releases when you want to pull updates. No lock-in, because there’s nothing to be locked into.

Give your CSS its cascade back

Read the methodology, copy the files, ship something.

Prefer email? Join the mailing list: new components and modern-CSS write-ups, no noise.