Skip to content
M MinimaCSS v0.3.0
Docs

A minimal CSS framework, fully modern.

Solves the pain points modern CSS finally lets you solve — light-dark() theming, JS-free menus via Popover + Anchor Positioning, :user-invalid forms, container queries, and Cascade Layers. ~24 KB gzipped.

Tip: click the coloured dot in the top-right to change the brand colour — every accent re-tints automatically via color-mix().

Why MinimaCSS?

01

Change your brand colour in one place

Set the accent colour once and every button, link, focus ring, hover state, and shade follows. No config rebuild, no Sass recompile, no hunting through variables. Try the colour picker in the top-right.

02

Dark mode without the duplicate work

Light and dark modes are defined together, not in two separate files. No dark: prefix on every utility, no parallel theme to maintain — just flip the attribute and everything adapts.

03

Forms that don't yell at you

Empty required fields don't turn red the moment the page loads. Validation styling only appears after the user actually interacts with the field. Helper text, required asterisks, and error colours are handled for you.

04

Modals, menus & dropdowns — no JavaScript

Built on the browser's own dialog, popover, and details elements. You get accessible overlays, escape-to-close, focus restoration, and click-outside dismissal without writing or importing any JS.

05

No more !important battles

Utility classes are guaranteed to win over component styles. Adjust a margin, override a colour, change a border — it just works. No specificity wars, no !important chains.

06

Components that adapt to their container

The same card looks right whether it's in a narrow sidebar or a wide hero. Components respond to the space they're given, not the size of the page.

07

Common layouts as a single class

Stack things vertically, cluster them in a wrap-friendly row, put a sidebar next to main content — each layout is one class. Less hand-written flex and grid, fewer breakpoint guesses.

08

Smooth open and close animations

Modals, toasts, and slideovers fade in when opening and fade out when closing — automatically, both directions. No manual timing code, no animation-end juggling.

09

25+ components, ready to go

Buttons, modals, tables, navigation, cards, alerts, tabs, badges, avatars, tooltips, toasts, pagination, skeletons, empty states, popovers, forms — drop them in and they look right.

10

Accessible by default

Focus rings that show only on keyboard navigation, AA-grade contrast, motion that respects user preferences, touch-friendly hit areas, a real print stylesheet — all built in, no setup.

11

One file, ~24 KB gzipped

The whole framework drops in with a single <link> tag. No external fonts to load, no icon pack to bundle, no JavaScript runtime. Open the page and it works.

12

Built on modern CSS

Uses what browsers can actually do today — modern layout, modern theming, modern selectors. No polyfills, no legacy workarounds, no fighting with things the platform handles natively.

Typography

Heading 1 — display

Heading 2 — section

Heading 3 — subsection

Heading 4

Heading 5
Heading 6

A paragraph of body text. Long enough to wrap onto two lines so the text-wrap: pretty default avoids leaving a single orphan word on the last line.

Blockquotes get a left accent border and a subtle tinted background that adapts to light or dark mode.

Inline code and a preformatted block:

const greet = name => `hello, ${name}`;

Layout & Grid

12-column grid (.row + .col-N)

col-6
col-6
col-4
col-4
col-4
col-3
col-6
col-3
<div class="row">
  <div class="col-6">…</div>
  <div class="col-6">…</div>
</div>

Auto-flow row (.row-auto)

1
2
3
4

Responsive auto-fit (.grid-auto-fit)

A
B
C
D
E
F
<div class="grid-auto-fit" style="--cell-min: 10rem;">
  <div>…</div>
</div>

Buttons

Solid variants

Outline variants

Sizes

Block & round

Button group

Forms

Inputs

Your legal name.
Required. Try submitting an invalid address.

Switches, checkboxes, radios

Range

Cards

Basic cards

Simple card

A card with just a body.

Header

Header + body + footer.

Stats

1,284

Active users this week.

Same card, two widths

Narrow

Smaller padding because this card is < 32rem wide.

Wider

More padding kicks in at @container (min-width: 32rem).

Alerts

Success! Your changes are saved.
FYI — version 0.3.0 is now available.
Outline success alert.
Outline info alert.

Badges, Avatars, Dividers

Badges

Primary Success Error Warning Info Light Dark

Avatars

AB
CD
EF
GH

Divider

Above the divider.

Below the divider.

Loader, Progress, Pagination

Loaders

Progress bars

25%
60%

Pagination

Joined pagination

Tabs & Accordion

Tabs

High-level overview content.

Accordion (native <details>)

What browsers do you support?

Baseline 2024+ — Safari 17.5+, Chrome 117+, Firefox 121+.

Can I tree-shake unused styles?

Build from source — comment out the @use lines in src/minimacss.scss you don't need, then npm run build.

Does it work with React / Vue / Svelte?

It's plain CSS. It works with any framework that renders HTML.

Segments

Steps

Modal, Slideover, Toast

Slideover

Slideovers are great for filters, settings, or details panes.

Table

# Name Role Status
1Ada LovelaceEngineerActive
2Alan TuringCryptographerActive
3Grace HopperCompiler architectAway
4Edsger DijkstraTheoristInactive

Tooltip & Dropdown

Tooltip

Hover me (top) Hover me (right) Hover me (bottom) Hover me (left)

Dropdown (native <details>)

@starting-style animations

:user-invalid forms

Fluid spacing

Fluid hero panel — padding scales with viewport.

Cascade layers

Layout primitives

.stack — vertical rhythm

First item
Second item
Third item — same gap between siblings, every time.

.cluster — wrap with gap

design ship v0.3.0 modern framework minimal

.sidebar-layout — responsive without media queries

.switcher — row → column at threshold

A
B
C

Popover & Menu JS-free

Form .field JS-free

Required — try submitting empty.
Used for billing.
Optional — no asterisk because it isn't required.

Input affixes & .kbd

$ USD
https://
@minimacss.dev

Press + K to search, or Esc to dismiss this modal.

Skeleton & Empty state

Skeleton

Empty state

No orders yet

When your customers place an order it'll appear here. Want to test the dashboard? Create a sample order.

Scroll-snap JS-free

Snap carousel

Slide A

Scroll right to see siblings snap.

Slide B

Each card snaps to start.

Slide C

No JavaScript carousel library.

Slide D

Just scroll-snap-type.

Horizontal chip row (hidden scrollbar)

All Design Engineering Product Marketing Operations Support Sales Research Legal