A
AiTechWorlds
AiTechWorlds
<!-- Padding: p-{n} where n Γ 4 = px -->
p-0 β 0px p-1 β 4px p-2 β 8px
p-3 β 12px p-4 β 16px p-5 β 20px
p-6 β 24px p-8 β 32px p-10 β 40px
p-12 β 48px p-16 β 64px p-20 β 80px
px-4 β padding left + right: 16px
py-4 β padding top + bottom: 16px
pt-4 β padding-top: 16px
pb-4 β padding-bottom: 16px
pl-4 β padding-left: 16px
pr-4 β padding-right: 16px
<!-- Margin (same pattern) -->
m-4 β margin: 16px
mx-auto β center horizontally
mt-8 β margin-top: 32px
-mt-4 β margin-top: -16px (negative margin)<!-- Font Size -->
text-xs β 12px text-sm β 14px
text-base β 16px text-lg β 18px
text-xl β 20px text-2xl β 24px
text-3xl β 30px text-4xl β 36px
text-5xl β 48px text-6xl β 60px
<!-- Font Weight -->
font-thin β 100 font-light β 300
font-normal β 400 font-medium β 500
font-semibold β 600 font-bold β 700
font-extrabold β 800 font-black β 900
<!-- Text Alignment -->
text-left text-center text-right text-justify
<!-- Line Height -->
leading-none β 1 leading-tight β 1.25
leading-normal β 1.5 leading-relaxed β 1.625
leading-loose β 2
<!-- Other -->
tracking-tight β letter-spacing: -0.05em
tracking-wide β letter-spacing: 0.025em
tracking-wider β letter-spacing: 0.05em
uppercase lowercase capitalize normal-case
line-clamp-1 line-clamp-2 line-clamp-3<!-- Common color patterns -->
bg-white bg-black bg-transparent
bg-gray-50 ... bg-gray-900
bg-blue-500 bg-red-500 bg-green-500
bg-yellow-400 bg-purple-600 bg-pink-500
text-white text-black
text-gray-400 text-gray-700 text-gray-900
border-gray-200 border-blue-500
<!-- With opacity (Tailwind v3+) -->
bg-blue-500/50 β background: rgba(blue, 0.5)
text-black/80 β color: rgba(0,0,0,0.8)
border-white/20 β border: rgba(255,255,255,0.2)flex inline-flex
flex-row flex-col flex-row-reverse flex-col-reverse
justify-start justify-end justify-center
justify-between justify-around justify-evenly
items-start items-end items-center
items-baseline items-stretch
self-start self-center self-end
flex-1 β flex: 1 1 0%
flex-auto β flex: 1 1 auto
flex-none β flex: none
flex-wrap flex-nowrap
flex-shrink-0 flex-grow
gap-4 gap-x-4 gap-y-4grid display: grid
grid-cols-1 ... grid-cols-12
grid-cols-none
col-span-1 ... col-span-12
col-span-full
col-start-1 col-end-3
grid-rows-1 ... grid-rows-6
row-span-2
row-start-1 row-end-3
auto-cols-auto auto-rows-auto
auto-rows-fr auto-rows-min<!-- Width -->
w-0 w-px w-0.5 w-1 w-2 w-4 w-8
w-16 w-32 w-48 w-64 w-80 w-96
w-auto w-full w-screen
w-1/2 w-1/3 w-2/3 w-1/4 w-3/4
max-w-xs β 320px max-w-sm β 384px
max-w-md β 448px max-w-lg β 512px
max-w-xl β 576px max-w-2xl β 672px
max-w-3xl β 768px max-w-4xl β 896px
max-w-5xl β 1024px max-w-6xl β 1152px
max-w-7xl β 1280px max-w-full β 100%
<!-- Height (same pattern) -->
h-4 h-8 h-16 h-32 h-64
h-full h-screen h-auto
min-h-screen min-h-full<!-- Border -->
border β 1px solid
border-2 β 2px solid
border-0 β no border
border-t border-r border-b border-l
<!-- Border Radius -->
rounded-none β 0
rounded-sm β 2px
rounded β 4px
rounded-md β 6px
rounded-lg β 8px
rounded-xl β 12px
rounded-2xl β 16px
rounded-3xl β 24px
rounded-full β 9999px (pill / circle)
rounded-t-xl β top corners only
rounded-l-xl β left corners only<!-- Shadow -->
shadow-sm shadow shadow-md
shadow-lg shadow-xl shadow-2xl
shadow-none shadow-inner
<!-- Opacity -->
opacity-0 opacity-25 opacity-50
opacity-75 opacity-100
<!-- Blur -->
blur-none blur-sm blur blur-md blur-lg blur-xl
<!-- Background blur -->
backdrop-blur-sm backdrop-blur backdrop-blur-mdstatic relative absolute fixed sticky
top-0 right-0 bottom-0 left-0
inset-0 β all sides 0
z-0 z-10 z-20 z-30 z-40 z-50 z-auto
overflow-hidden overflow-scroll overflow-auto overflow-visible
block inline-block inline hidden flex gridsm: β min-width: 640px
md: β min-width: 768px
lg: β min-width: 1024px
xl: β min-width: 1280px
2xl: β min-width: 1536px
<!-- Examples -->
<div class="w-full md:w-1/2 lg:w-1/3">...</div>
<p class="text-sm lg:text-base">Text</p>
<div class="flex-col md:flex-row gap-4">...</div>
<nav class="hidden lg:flex">Desktop Nav</nav>hover:bg-blue-600 β on hover
focus:ring-2 β on focus
focus:outline-none β remove focus outline
active:scale-95 β on click
disabled:opacity-50 β when disabled
dark:bg-gray-900 β dark mode
group-hover:text-blue β when parent .group hovered
<!-- Transitions -->
transition all 150ms ease
transition-colors color, bg, border
transition-transform transform
duration-150 duration-200 duration-300
ease-in ease-out ease-in-out
<!-- Transform -->
scale-95 scale-100 scale-105
translate-x-4 translate-y-2
rotate-45 rotate-90Advertisement
Get more notes like this daily on Telegram!
Free study notes, cheat sheets & AI tips
Last reviewed on June 13, 2026 by the AiTechWorlds Notes Team. Free cheat sheet β no signup required.
Advertisement
Join AiTechWorlds on Telegram and get daily AI tips, prompt engineering templates, coding resources, and exclusive content β 100% free!
No spam. Leave anytime.