Tailwind to EM Converter
Convert Tailwind to EM.
About Tailwind to EM Converter
This tool converts Tailwind CSS spacing scale values (based on REMs) into relative EM units. Since Tailwind values map to fixed REM inputs (1 unit = 0.25rem), converting them to EM requires knowing the context (Parent Font Size) to maintain the same visual size.
Formula
Examples
Reference
- • Tailwind units are 0.25rem base
- • EM is relative to parent font size
- • Default Root Size: 16px
- • Useful for scalable components
Frequency Asked Questions
Why convert Tailwind to EM?
To create components that scale relative to their own font size while using standard Tailwind spacing logic as a baseline.
Does Tailwind use EMs?
Tailwind's default scale uses REMs. You can configure it to use EMs if needed, or use arbitrary values like `p-[1em]`.
How does Root Size affect this?
Tailwind's scale is based on REM. To calculate the physical pixel size to then convert to EM, we need the Root font size (usually 16px).