A small, sharp language that compiles to plain CSS. Components, tokens, breakpoints. No new runtime. No framework. Just shorter files.
npm install -D @srivtx/tomato-css
# a button component btn: pad 2 4 round lg bold pointer button: use btn bg blue-500 color white hover: bg blue-600
button { padding: 0.5rem 1rem; border-radius: 0.5rem; font-weight: bold; cursor: pointer; background: #3b82f6; color: #ffffff; } button:hover { background: #2563eb; }
Tomato is a preprocessor, not a framework. You write .tom files. The compiler
reads them and emits standard CSS. There is no JavaScript shipped to the browser and no classes you
have to remember.
The language is intentionally small. pad 2 4 instead of padding: 0.5rem 1rem.
use btn instead of copy-pasting twelve lines. @mobile: instead of
writing a media query by hand. You can read the whole spec in two minutes.
Tailwind colors are built in. The spacing scale, radius scale, and shadow scale match the same
scales you've been using for years. Anything Tomato can't express, you drop into a
property: value; line and it passes through unchanged.
button, .class, #id, and
button.btn. Comma-separated groups (.a, .b) work.
pad, m, round, shadow, bg,
color, row, column, grid, gap,
center, hidden, block, flex.
component btn: defines a reusable block. use btn pastes it
into any selector.
hover:, focus:, active:, disabled:.
Indent one level. No & needed.
@mobile, @tablet, @laptop, @desktop,
@wide — match the Tailwind widths out of the box.
@dark: and @light: compile to real
prefers-color-scheme media queries.
primary, then use bg primary anywhere.
@import "./tokens.tom" shares them across files.
grid-template-areas, the lot.