Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
spencerpauly avatar

Converting Css To Tailwind

  • 236 installs
  • 655 repo stars
  • Updated August 2, 2026
  • spencerpauly/awesome-cursor-skills

Helps with frontend development tasks.

About

converting-css-to-tailwind is a Claude Code skill for frontend development. It helps solo builders move faster with AI-assisted coding.

  • converting-css-to-tailwind
  • Frontend Development
  • AI-coding skill

Converting Css To Tailwind by the numbers

  • 236 all-time installs (skills.sh)
  • +23 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #817 of 2,245 Frontend Development skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/spencerpauly/awesome-cursor-skills --skill converting-css-to-tailwind

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs236
repo stars655
Last updatedAugust 2, 2026
Repositoryspencerpauly/awesome-cursor-skills

What it does

Helps with frontend development tasks.

Files

SKILL.mdMarkdownGitHub ↗

Converting CSS to Tailwind

Migrate plain CSS files to Tailwind utility classes applied directly in markup.

Workflow

1. Read the CSS file and inventory every rule 2. Find the corresponding markup (HTML, JSX, TSX, Vue, Svelte) that references each selector 3. Convert each rule using the mapping below 4. Delete the CSS rule once all its properties are expressed as utilities 5. Remove the CSS file (or import) once it's empty 6. Verify the page looks identical — check for visual regressions

Conversion Reference

Layout & Box Model

CSSTailwind
display: flexflex
display: gridgrid
display: nonehidden
position: relativerelative
position: absoluteabsolute
justify-content: centerjustify-center
align-items: centeritems-center
gap: 16pxgap-4
width: 100%w-full
max-width: 768pxmax-w-3xl
margin: 0 automx-auto
padding: 16pxp-4
overflow: hiddenoverflow-hidden

Typography

CSSTailwind
font-size: 14pxtext-sm
font-weight: 700font-bold
line-height: 1.5leading-normal
text-align: centertext-center
text-transform: uppercaseuppercase
color: #333text-[#333] or a theme color
letter-spacing: 0.05emtracking-wide

Backgrounds & Borders

CSSTailwind
background-color: #f5f5f5bg-[#f5f5f5] or bg-neutral-100
border: 1px solid #e5e7ebborder border-gray-200
border-radius: 8pxrounded-lg
box-shadow: 0 1px 3px ...shadow-sm

Responsive — Media Queries

@media (min-width: 768px) { .card { flex-direction: row; } }

<div class="flex-col md:flex-row">

Map breakpoints: sm: (640), md: (768), lg: (1024), xl: (1280), 2xl: (1536)

Pseudo-classes & States

.btn:hover { background-color: #1d4ed8; }

<button class="hover:bg-blue-700">

Prefixes: hover:, focus:, active:, disabled:, first:, last:, odd:, even:, group-hover:, peer-checked:

Animations & Transitions

transition: all 0.2s ease-in-out;

transition-all duration-200 ease-in-out

@keyframes spin { ... }
animation: spin 1s linear infinite;

animate-spin (built-in) or define in tailwind.config

Custom Properties / Arbitrary Values

For anything without a direct utility, use arbitrary values:

  • w-[calc(100%-2rem)]
  • grid-cols-[200px_1fr_1fr]
  • text-[clamp(1rem,2vw,1.5rem)]

Handling Remaining CSS

Some things can't be expressed purely as utilities:

  • Complex selectors (.parent > .child + .sibling) — restructure the markup or use @apply as a last resort
  • `@font-face` — keep in a global CSS file or globals.css
  • Complex `@keyframes` — define in tailwind.config.ts under theme.extend.keyframes
  • CSS variables — migrate to Tailwind theme values in tailwind.config.ts

Rules

  • Prefer semantic Tailwind classes (bg-primary) over arbitrary hex values when a theme exists
  • Don't use @apply to recreate the same CSS you're migrating away from — that defeats the purpose
  • Group related utilities logically: layout → spacing → typography → colors → effects
  • If a component has 10+ utilities, consider extracting a reusable component rather than a CSS class

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.