A Tailwind CSS v4 plugin built entirely in CSS. Every utility scales
proportionally to the viewport using
calc()
and
clamp().
w-100
renders as
—
Resize the window (or open it on your phone) — it updates live.
Live demo — every box scales with the viewport
Same w-* /
h-* classes — proportional at
any width, capped at the reference.
How it works
Every class shares a single
--calc-ratio factor, so every
property scales fluidly with the viewport.
Generated CSS
value
The number in your class.
100 in
w-100.
max-width
Viewport cap. Values stop growing past the reference width.
base-width
Design reference: 375 on
mobile, 1440 from
md.
📱 Built-in mobile support
The base reference switches automatically at the
md breakpoint, so you design
mobile-first and pair it with normal responsive variants:
text-44 uses the
375 reference on phones;
md:text-88 takes over with
the 1440 reference on larger
screens — this very page is built that way.
w-100 across viewport widths
(illustrated with a fixed
--window-width: 1440)
Values are capped at the base width — no overflow on ultra-wide screens.
Features
No JavaScript. No runtime. Built entirely with native CSS features
—
@utility,
calc() and
clamp(). Pure, zero-overhead
performance.
Design at a fixed reference width and every screen gets a perfectly proportional result. No breakpoints. No media queries. Just math.
Override the reference width with a single CSS variable. Set
--window-width: 1920 and
every utility instantly recalculates to match your design system.
All compatible utilities support negative variants. Use
-mt-20,
-top-40,
-translate-x-50 — all
properly scaled.
Available utilities
Sizing
Padding
Margin + negative
Typography + negative
Positioning + negative
Transform + negative
Gap
Borders & Radius
Misc + negative
Get started
Install the package
Import in your CSS file
That's it. 🎉
All utilities are now available. Use
w-100,
p-24,
text-48
and any other numeric class — they all scale with the viewport.