Free Reference

CSS to Tailwind Cheat Sheet

The quick-reference guide for converting CSS properties to Tailwind utility classes. Search by property name, CSS value, or Tailwind class. Click to copy.

195 results
CSS PropertyCSS ValueTailwind Class
displayblock
block
displayinline-block
inline-block
displayinline
inline
displayflex
flex
displayinline-flex
inline-flex
displaygrid
grid
displaynone
hidden
positionstatic
static
positionrelative
relative
positionabsolute
absolute
positionfixed
fixed
positionsticky
sticky
floatleft
float-left
floatright
float-right
floatnone
float-none
overflowauto
overflow-auto
overflowhidden
overflow-hidden
overflowscroll
overflow-scroll
overflowvisible
overflow-visible
z-index0
z-0
z-index10
z-10
z-index50
z-50
CSS PropertyCSS ValueTailwind Class
flex-directionrow
flex-row
flex-directioncolumn
flex-col
flex-directionrow-reverse
flex-row-reverse
flex-directioncolumn-reverse
flex-col-reverse
flex-wrapwrap
flex-wrap
flex-wrapnowrap
flex-nowrap
justify-contentflex-start
justify-start
justify-contentcenter
justify-center
justify-contentflex-end
justify-end
justify-contentspace-between
justify-between
justify-contentspace-around
justify-around
justify-contentspace-evenly
justify-evenly
align-itemsflex-start
items-start
align-itemscenter
items-center
align-itemsflex-end
items-end
align-itemsstretch
items-stretch
align-itemsbaseline
items-baseline
flex1 1 0%
flex-1
flex1 1 auto
flex-auto
flexnone
flex-none
gap0.25rem
gap-1
gap0.5rem
gap-2
gap1rem
gap-4
gap1.5rem
gap-6
gap2rem
gap-8
CSS PropertyCSS ValueTailwind Class
grid-template-columnsrepeat(1, minmax(0, 1fr))
grid-cols-1
grid-template-columnsrepeat(2, minmax(0, 1fr))
grid-cols-2
grid-template-columnsrepeat(3, minmax(0, 1fr))
grid-cols-3
grid-template-columnsrepeat(4, minmax(0, 1fr))
grid-cols-4
grid-template-columnsrepeat(12, minmax(0, 1fr))
grid-cols-12
grid-columnspan 2 / span 2
col-span-2
grid-columnspan 3 / span 3
col-span-3
grid-column1 / -1
col-span-full
grid-template-rowsrepeat(1, minmax(0, 1fr))
grid-rows-1
grid-template-rowsrepeat(3, minmax(0, 1fr))
grid-rows-3
CSS PropertyCSS ValueTailwind Class
padding0
p-0
padding0.25rem
p-1
padding0.5rem
p-2
padding1rem
p-4
padding1.5rem
p-6
padding2rem
p-8
padding-left / padding-right1rem
px-4
padding-top / padding-bottom1rem
py-4
margin0
m-0
marginauto
m-auto
margin0.25rem
m-1
margin0.5rem
m-2
margin1rem
m-4
margin2rem
m-8
margin-left / margin-rightauto
mx-auto
CSS PropertyCSS ValueTailwind Class
width100%
w-full
widthauto
w-auto
width100vw
w-screen
widthfit-content
w-fit
widthmin-content
w-min
widthmax-content
w-max
height100%
h-full
height100vh
h-screen
heightauto
h-auto
min-width0
min-w-0
min-width100%
min-w-full
max-width100%
max-w-full
max-width28rem
max-w-md
max-width32rem
max-w-lg
max-width36rem
max-w-xl
max-width42rem
max-w-2xl
max-width80rem
max-w-7xl
CSS PropertyCSS ValueTailwind Class
font-size0.75rem
text-xs
font-size0.875rem
text-sm
font-size1rem
text-base
font-size1.125rem
text-lg
font-size1.25rem
text-xl
font-size1.5rem
text-2xl
font-size1.875rem
text-3xl
font-size2.25rem
text-4xl
font-weight100
font-thin
font-weight300
font-light
font-weight400
font-normal
font-weight500
font-medium
font-weight600
font-semibold
font-weight700
font-bold
text-alignleft
text-left
text-aligncenter
text-center
text-alignright
text-right
text-alignjustify
text-justify
line-height1
leading-none
line-height1.25
leading-tight
line-height1.5
leading-normal
line-height2
leading-loose
letter-spacing-0.05em
tracking-tighter
letter-spacing0em
tracking-normal
letter-spacing0.1em
tracking-widest
text-decorationunderline
underline
text-decorationline-through
line-through
text-decorationnone
no-underline
text-transformuppercase
uppercase
text-transformlowercase
lowercase
text-transformcapitalize
capitalize
white-spacenowrap
whitespace-nowrap
word-breakbreak-all
break-all
overflow-wrapbreak-word
break-words
CSS PropertyCSS ValueTailwind Class
colorinherit
text-inherit
colortransparent
text-transparent
color#000
text-black
color#fff
text-white
background-colortransparent
bg-transparent
background-color#000
bg-black
background-color#fff
bg-white
colorrgb(59 130 246)
text-blue-500
colorrgb(239 68 68)
text-red-500
colorrgb(34 197 94)
text-green-500
background-colorrgb(59 130 246)
bg-blue-500
background-colorrgb(239 68 68)
bg-red-500
colorrgb(107 114 128)
text-gray-500
background-colorrgb(249 250 251)
bg-gray-50
CSS PropertyCSS ValueTailwind Class
border-width0
border-0
border-width1px
border
border-width2px
border-2
border-width4px
border-4
border-radius0
rounded-none
border-radius0.125rem
rounded-sm
border-radius0.25rem
rounded
border-radius0.375rem
rounded-md
border-radius0.5rem
rounded-lg
border-radius0.75rem
rounded-xl
border-radius9999px
rounded-full
border-stylesolid
border-solid
border-styledashed
border-dashed
border-styledotted
border-dotted
border-stylenone
border-none
CSS PropertyCSS ValueTailwind Class
opacity0
opacity-0
opacity0.5
opacity-50
opacity0.75
opacity-75
opacity1
opacity-100
box-shadow0 1px 2px 0 rgb(0 0 0 / 0.05)
shadow-sm
box-shadow0 1px 3px 0 rgb(0 0 0 / 0.1), ...
shadow
box-shadow0 4px 6px -1px rgb(0 0 0 / 0.1), ...
shadow-md
box-shadow0 10px 15px -3px rgb(0 0 0 / 0.1), ...
shadow-lg
box-shadow0 20px 25px -5px rgb(0 0 0 / 0.1), ...
shadow-xl
box-shadownone
shadow-none
mix-blend-modemultiply
mix-blend-multiply
mix-blend-modescreen
mix-blend-screen
mix-blend-modeoverlay
mix-blend-overlay
CSS PropertyCSS ValueTailwind Class
transition-propertyall
transition-all
transition-propertycolor, background-color, ...
transition
transition-propertycolor
transition-colors
transition-propertyopacity
transition-opacity
transition-propertytransform
transition-transform
transition-propertynone
transition-none
transition-duration75ms
duration-75
transition-duration150ms
duration-150
transition-duration200ms
duration-200
transition-duration300ms
duration-300
transition-duration500ms
duration-500
transition-timing-functionease-in
ease-in
transition-timing-functionease-out
ease-out
transition-timing-functionease-in-out
ease-in-out
transition-timing-functionlinear
ease-linear
CSS PropertyCSS ValueTailwind Class
transformtranslateX(0)
translate-x-0
transformtranslateX(100%)
translate-x-full
transformtranslateY(-100%)
-translate-y-full
transformrotate(0deg)
rotate-0
transformrotate(45deg)
rotate-45
transformrotate(90deg)
rotate-90
transformrotate(180deg)
rotate-180
transformscale(0)
scale-0
transformscale(0.5)
scale-50
transformscale(0.75)
scale-75
transformscale(1)
scale-100
transformscale(1.5)
scale-150
transform-origincenter
origin-center
transform-origintop
origin-top
transform-originbottom-right
origin-bottom-right
{TIPS}

CSS to Tailwind conversion tips

1

Map properties, not selectors

Tailwind replaces individual CSS declarations, not entire rule blocks. Break your CSS into single-property declarations and find the matching utility class for each one. A rule with 5 declarations turns into 5 utility classes on one element.

2

Use the spacing scale

Tailwind uses a consistent spacing scale where 1 unit equals 0.25rem (4px at default font size). So p-4 is 1rem, m-8 is 2rem. Once you learn the pattern, you can calculate any spacing value without a reference.

3

Responsive and state variants

Prefix any class with a breakpoint like md: or a state like hover: to apply it conditionally. For example, md:flex replaces a @media (min-width: 768px) block with display: flex.

4

Arbitrary values for edge cases

When a CSS value does not map to a built-in Tailwind class, use the arbitrary value syntax: w-[137px] or bg-[#1da1f2]. This keeps everything in the utility-first pattern without needing custom CSS.

5

Automate the tedious parts

For large-scale conversions, manual lookup gets slow. The ExtractCSS HTML & CSS to Tailwind converter handles entire stylesheets at once, snapping values to the nearest Tailwind token and resolving specificity conflicts automatically.

Takes 10 Seconds to Install

Extract your first component in the next 60 seconds

Install the extension. Navigate to any website. Click the component you want. Get clean Tailwind code. It really is that simple.