How a declaration becomes a class
Each declaration is looked up in a table of Tailwind mappings. Values on the default spacing scale become short utilities, using a pixel table where 14 maps to 3.5 and 16 to 4. Anything off that scale is wrapped in arbitrary-value brackets rather than snapped to the nearest step, so color: #334155 becomes text-[#334155] instead of a colour that merely looks similar.
Paste a rule with braces, a bare list of declarations, or both mixed: with no brace present the input splits on semicolons and newlines, so missing separators are not treated as errors.
A worked example
Load sample feeds in twelve declarations and the counter reads "12 classes from 12 declarations". The output is flex items-center justify-space-between gap-4 py-4 px-6 bg-[#ffffff] text-[#334155] rounded-lg shadow-[0_1px_2px_rgba(0_0_0_0.06)] text-3.5 z-10. Note that padding: 16px 24px splits into two classes while border: 1px solid #e2e8f0 contributes nothing, and the grey panel below names that property as unconverted.
What maps, and what falls through
Mapped: display, position, overflow, object-fit, box-sizing, visibility, list-style-type, the flex alignment properties, grid templates and spans, gap, the width and height families, insets, margin and padding shorthands of one to four parts, the colour properties, font-size, letter-spacing, font-family, z-index, opacity, border-radius, border-width, box-shadow, cursor and a few text properties. Passed straight back as plain CSS: custom properties, transform, aspect-ratio, transition-duration, the border shorthand and background images.
Where it stops
- Output is one flat class list with no variants, so hover, responsive and dark prefixes are manual work.
- Some generated utilities do not exist in Tailwind as written:
justify-space-betweenforjustify-between,border-2pxforborder-2,opacity-0.5foropacity-50. - Spaces inside colour functions are stripped to build the bracket value, mangling syntax such as
rgb(10 20 30 / 50%). - Media queries, keyframes and nested rules are flattened away rather than converted.
Questions people ask
Why keep bg-[#ffffff] instead of bg-white?
Naming a hex assumes your theme keeps the default palette. The bracket form always renders the value you pasted.
Can I trust every class it emits?
Check any that your config customises. Verify the source sheet in css-validator first, then compress what you keep with css-minifier.