Coming from Tailwind

A translation table from the most common Tailwind classes to Yumma CSS, and the four differences that actually matter.

What Carries Over

If you know Tailwind, most of the workflow transfers unchanged: utilities in the markup, variants as prefixes, a config file, a build step that scans your source.

The spacing scale is identical. Both frameworks use 0.25rem steps, so p-4 is 1rem in Tailwind and 1rem in Yumma CSS. Every spacing, sizing and gap number you already have in your head is still correct.

What Changes

Four things, and they account for nearly every surprise.

  1. Class names abbreviate the CSS property, not a concept. text-lg and text-red-500 become fs-lg and c-red — different prefixes, because they are different properties.
  2. Variants use punctuation. Breakpoints are @, states are :. md:flex becomes @md:d-f; hover:bg-white becomes h:bg-white.
  3. There are no arbitrary values. No p-[13px]. Use the scale, or write CSS.
  4. Some prefixes are shared between properties and resolved by the value. o-50 is opacity, o-h is overflow. See the naming rule.

Translation Table

Layout

TailwindYumma CSSCSS
flexd-fdisplay: flex
gridd-gdisplay: grid
blockd-bdisplay: block
inline-flexd-ifdisplay: inline-flex
hiddend-nonedisplay: none
flex-colfd-cflex-direction: column
items-centerai-calign-items: center
items-startai-fsalign-items: flex-start
justify-betweenjc-sbjustify-content: space-between
justify-centerjc-cjustify-content: center
grid-cols-3gtc-3grid-template-columns
flex-1f-1flex: 1
growfg-1flex-grow: 1

Spacing

TailwindYumma CSSCSS
p-4p-4padding: 1rem
px-4px-4padding-inline: 1rem
py-4py-4padding-block: 1rem
m-4m-4margin: 1rem
mx-automx-automargin-inline: auto
gap-4g-4gap: 1rem
gap-x-4cg-4column-gap: 1rem
gap-y-4rg-4row-gap: 1rem

gap-x is the clearest example of the difference in approach. There is no gap-x property in CSS — the property is column-gap, which is what cg-4 says.

Sizing

TailwindYumma CSSCSS
w-fullw-100%width: 100%
w-64w-64width: 16rem
h-screenh-dvhheight: 100dvh
min-h-screenmin-h-dvhmin-height: 100dvh
max-w-lgmax-w-lgmax-width: 64rem
w-autow-autowidth: auto

Typography

TailwindYumma CSSCSS
text-basefs-mdfont-size
text-lgfs-lgfont-size
font-semiboldfw-600font-weight: 600
text-red-500c-redcolor
text-centerta-ctext-align: center
uppercasett-utext-transform: uppercase
leading-5lh-5line-height
tracking-tightls-1letter-spacing
truncateto-etext-overflow: ellipsis
whitespace-nowrapws-nwwhite-space: nowrap

Backgrounds & Borders

TailwindYumma CSSCSS
bg-whitebg-whitebackground-color
bg-red-500bg-redbackground-color
borderbw-1border-width: 1px
border-gray-200bc-gray-2border-color
rounded-mdbr-mdborder-radius
rounded-fullbr-9999border-radius: 9999px
shadow-mdbs-o-mdbox-shadow
shadow-innerbs-i-mdbox-shadow (inset)

Positioning & Effects

TailwindYumma CSSCSS
relativep-rposition: relative
absolutep-aposition: absolute
stickyp-stposition: sticky
top-0t-0top: 0
-ml-4ml--4margin-left: -1rem
z-10zi-10z-index: 10
overflow-hiddeno-hoverflow: hidden
opacity-50o-50opacity: 50%
invisiblev-hvisibility: hidden
cursor-pointerc-pcursor: pointer
select-noneus-noneuser-select: none
object-coverof-cobject-fit: cover
duration-150tdu-150transition-duration: 150ms

Variants

TailwindYumma CSS
md:flex@md:d-f
lg:grid-cols-3@lg:gtc-3
hover:bg-whiteh:bg-white
focus:outline-nonef:ow-0
active:scale-95a:s-90
before:blockb::d-b
dark:bg-blackSee dark mode

before:content-['…'] has no equivalent. Arbitrary values are the one Tailwind feature with no Yumma CSS counterpart, and generated content is where you will hit it first. Write that rule in a stylesheet.

Breakpoints are @-prefixed and mobile-first, exactly as in Tailwind: media queries. State variants are single letters: pseudo-classes, pseudo-elements.

Migrating An Existing Project

There is no codemod, and writing one would be a bad idea — the shared-prefix rows above need a human to check the value, and a mechanical rewrite will silently produce o-50 where you meant overflow.

A workable order:

  1. 1

    Run both frameworks side by side

    Nothing stops you from generating both stylesheets during a migration. Yumma CSS only emits rules for classes it finds in your configured source globs.

  2. 2

    Convert one component at a time

    Start with something small and self-contained. The IntelliSense extensions autocomplete and show the resolved property on hover, which is most of the translation work.

  3. 3

    Add the validator to CI

    yummacss-canon fails the build on any class that is not in the canon. This catches half-converted markup, typos, and Tailwind classes left behind — and it is also what stops an LLM from inventing utilities that do not exist.

Try Before Committing

The playground compiles in the browser and shows the generated CSS. Paste a component and rewrite it there first — it is the cheapest way to find out whether the notation suits you.