Monsoon v0.2.0
Made by Alexandre Kohler Star

Why Monsoon

20 reasons to link one stylesheet

Each reason below has a live demo built with the classes it describes, or the few lines of code it takes. The demos on this page use the same stylesheet you would link, plus the small arbitrary value script for the one demo that needs it.

01

Zero build in production, from a CDN

One stylesheet link is the whole install: every class is already in the file, 88.3 kB with brotli, so there is no compiler, config or watcher, in development or in production.

index.html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/monsooncss@0.2.0">
Learn more
02

Arbitrary values without a build step

Write w-[37px] or bg-[#0ea5e9] when no step fits: a small script writes the rules in the browser, or the purge CLI compiles them for production.

grid-cols-[1fr_2fr]
Learn more
03

A whole theme from one --seed color

Primary, accent, surfaces, borders, muted text and the focus ring are computed from one OKLCH seed in pure CSS, so one line re-themes everything.

Learn more
04

Accessible contrast, tested for every token pair

Every fill and its foreground keep at least 4.5:1 for any seed, in light and dark mode, and the test suite checks each pair across a sweep of seeds.

light seeddark seedmid seed
Learn more
05

Per-section theming with style="--seed"

Put a seed on any element and only that subtree re-themes, so a pricing card, a sidebar or a whole tenant can have its own brand on the same page.

Ocean

Ember

Learn more
06

Dark mode that follows the nearest themed ancestor

A light card inside a dark section inside a light page is exactly what you expect, at any depth, for the tokens and for the dark: prefix alike.

dark

light

dark again
Learn more
07

167 components in the same file

167 components ship in the one stylesheet, 122 of them with no script at all: forms, actions, navigation, overlays and data display.

NewActiveCtrlK64%
Learn more
08

Components that need no JavaScript

Dialogs, popovers, menus and accordions are built on dialog, the popover attribute and details, so the browser does the work and nothing has to hydrate.

Does it need a script?
No. This is a details element.
Learn more
09

An optional interactive layer

One script adds file drop, cropping, date pickers, sortable lists, comboboxes and more on top of native inputs that keep working without it.

index.html
<script src="https://cdn.jsdelivr.net/npm/monsooncss@0.2.0/dist/monsoon.js" defer></script>
<div class="datepicker" data-m-datepicker>
  <input type="date" class="input">
</div>
Learn more
10

Container query variants built in

Prefix a class with @sm: to @xl: and it reacts to the width of its container, so a card adapts to the column it is dropped into.

Stacks when narrow, a row from 20rem of container width.

Learn more
11

Fluid type and spacing utilities

text-fluid-* and p-fluid-* grow smoothly with the viewport between a mobile and a desktop size, with no breakpoint classes and respecting browser zoom.

Fluid heading

Resize the window to watch it grow.

Learn more
12

Print, rtl, ltr and forced-colors variants

Hide navigation when printing, mirror a margin in right to left languages and fix a border for high contrast themes, all with a prefix.

index.html
<nav class="print:hidden">...</nav>
<span class="ml-4 rtl:ml-0 rtl:mr-4">Badge</span>
<div class="border-0 forced-colors:border">...</div>
Learn more
13

Zero config purge that compiles arbitrary values

One command keeps only the classes your files use and writes static rules for every arbitrary value it finds, with no config file.

Terminalterminal
npx monsooncss purge "src/**/*.{html,jsx,vue,php}" -o public/monsoon.css
Learn more
14

Works with any backend or framework

It is plain CSS classes, so server templates, static site generators and single page apps all use it the same way, with 17 step by step install guides.

users.html
{% for user in users %}
  <li class="flex items-center gap-3 py-2">{{ user.name }}</li>
{% endfor %}
Learn more
15

One shared token scale for every control

Inputs, selects and buttons of the same size share one height, radius and padding token, so a row of mixed controls lines up with no tweaks.

Learn more
16

An in-gamut OKLCH palette

Twenty-two hues share one lightness curve and have their chroma capped to sRGB, so step 500 of every hue looks equally strong and renders the same everywhere.

Learn more
17

Accessible by default

Every component has a visible focus ring, motion stops under prefers-reduced-motion and controls stay usable in forced colors mode, with no extra classes.

and to me
Learn more
18

Utilities always override components

Components sit before the utilities in the same file, so a utility on a component always wins without !important or a specificity fight.

Learn more
19

One cached file for every page and project

Every page of every site that links the same version shares one file the browser already has, so the second page and the next project load no CSS at all.

index.html
<!-- page one, page two, project three: the same URL -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/monsooncss@0.2.0">
Learn more
20

A machine readable class index

classes.json lists all 4,923 classes with their CSS and variants, ready for editor completion, linters and other tooling.

classes.json
{
  "class": "grid-cols-3",
  "category": "grid",
  "css": ".grid-cols-3 {\n  grid-template-columns: repeat(3, minmax(0, 1fr));\n}",
  "variants": ["sm", "md", "lg", "xl", "2xl", "@xs", "@sm", "@md", "@lg", "@xl", "print", "screen"]
}
Learn more

Paste one line. Start building.

Free and open source under the MIT license.

index.html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/monsooncss">

No recent searches

Try , , or .

Recent

Loading the search index

No results for ""

Check the spelling, or search a class name such as px-4.