Converting Custom CSS to Tailwind — Cheat Sheet
/* Custom CSS → Tailwind utility classes */
background:#0d1117 → bg-slate-900
border-radius:12px → rounded-xl
padding:24px → p-6
font-size:14px → text-sm
font-weight:600 → font-semibold
display:flex → flex
align-items:center → items-center
gap:16px → gap-4
grid-template-cols → grid-cols-3
max-width:900px → max-w-4xl
position:sticky → sticky top-0
backdrop-filter → backdrop-blur-md
Frequently Asked Questions
Can I use HTML templates with Tailwind CSS?
Yes — two approaches: 1) Keep the template's custom CSS as-is (works in any Tailwind project alongside Tailwind classes). 2) Convert the template's custom CSS to Tailwind utility classes using the cheat sheet above. UIXDraft templates use CSS custom properties that work perfectly alongside Tailwind without conflicts.
Should I use Tailwind CSS or custom CSS for templates?
Custom CSS (UIXDraft approach) advantages: no build step, semantic class names, 5-variable rebranding, no framework lock-in. Tailwind advantages: consistent design constraints, huge ecosystem (Tailwind UI, shadcn, DaisyUI), and team familiarity if your stack is already Tailwind. If you're not already on Tailwind, custom CSS is faster to use and easier to customise.
How do I convert a CSS template to Tailwind?
Replace each CSS rule with equivalent Tailwind utilities: `padding:24px` → `p-6`, `border-radius:12px` → `rounded-xl`, `display:flex;gap:16px` → `flex gap-4`, `background:#0d1117` → `bg-slate-900`. For custom values not in Tailwind's scale: use arbitrary values `p-[17px]` or extend the config. Plan 30–60 minutes per page for a full conversion.
What is the difference between Tailwind CSS and Bootstrap?
Tailwind: utility-first (compose styles from small classes), no pre-built components, maximum design flexibility, requires purging for production. Bootstrap: component-first (pre-styled buttons, cards, navbars), faster prototyping, more opinionated design, heavier base CSS (~30KB). Tailwind is preferred in 2026 for custom designs; Bootstrap for rapid prototyping with standard UI patterns.
Do UIXDraft templates work with Tailwind?
Yes — UIXDraft templates use standard CSS that can coexist with Tailwind in the same project. You can use UIXDraft templates as static HTML directly, import them into a Tailwind/Next.js project with minimal changes, or convert the CSS to Tailwind utilities. The CSS custom property token system is compatible with Tailwind's configuration approach.