1. Spacing (Margin & Padding)
/* Margin */
.m-0 { margin: 0; }
.m-0.5 { margin: 2px; } /* 0.125rem */
.m-1 { margin: 4px; } /* 0.25rem */
.m-1.5 { margin: 6px; } /* 0.375rem */
.m-2 { margin: 8px; } /* 0.5rem */
.m-2.5 { margin: 10px; } /* 0.625rem */
.m-3 { margin: 12px; } /* 0.75rem */
.m-3.5 { margin: 14px; } /* 0.875rem */
.m-4 { margin: 16px; } /* 1rem */
.m-5 { margin: 20px; } /* 1.25rem */
.m-6 { margin: 24px; } /* 1.5rem */
.m-8 { margin: 32px; } /* 2rem */
.m-10 { margin: 40px; } /* 2.5rem */
.m-12 { margin: 48px; } /* 3rem */
.m-16 { margin: 64px; } /* 4rem */
.m-20 { margin: 80px; } /* 5rem */
.m-auto{ margin: auto; }
/* Margin axis */
.mx-4 { margin-left: 16px; margin-right: 16px; }
.my-6 { margin-top: 24px; margin-bottom: 24px; }
.mt-2 { margin-top: 8px; }
.mb-8 { margin-bottom: 32px; }
.ml-auto{ margin-left: auto; }
.mr-auto{ margin-right: auto; }
/* Padding */
.p-0 { padding: 0; }
.p-0.5 { padding: 2px; } /* 0.125rem */
.p-1 { padding: 4px; } /* 0.25rem */
.p-1.5 { padding: 6px; } /* 0.375rem */
.p-2 { padding: 8px; } /* 0.5rem */
.p-2.5 { padding: 10px; } /* 0.625rem */
.p-3 { padding: 12px; } /* 0.75rem */
.p-3.5 { padding: 14px; } /* 0.875rem */
.p-4 { padding: 16px; } /* 1rem */
.p-5 { padding: 20px; } /* 1.25rem */
.p-6 { padding: 24px; } /* 1.5rem */
.p-8 { padding: 32px; } /* 2rem */
.p-10 { padding: 40px; } /* 2.5rem */
/* Padding axis */
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.pt-2 { padding-top: 8px; }
.pb-8 { padding-bottom: 32px; }
2. Sizing (Width / Height / Min / Max)
/* Width */
.w-0 { width: 0; }
.w-px { width: 1px; }
.w-1 { width: 4px; } /* 0.25rem */
.w-2 { width: 8px; } /* 0.5rem */
.w-4 { width: 16px; } /* 1rem */
.w-8 { width: 32px; } /* 2rem */
.w-16 { width: 64px; } /* 4rem */
.w-1\/2 { width: 50%; }
.w-1\/3 { width: 33.3333%; }
.w-2\/3 { width: 66.6666%; }
.w-full { width: 100%; }
.w-screen { width: 100vw; }
.w-\[200px\] { width: 200px; }
/* Height */
.h-0 { height: 0; }
.h-px { height: 1px; }
.h-4 { height: 16px; } /* 1rem */
.h-8 { height: 32px; } /* 2rem */
.h-16 { height: 64px; } /* 4rem */
.h-64 { height: 256px; } /* 16rem */
.h-full { height: 100%; }
.h-screen { height: 100vh; }
/* Min/Max Width */
.min-w-0 { min-width: 0; }
.min-w-full { min-width: 100%; }
.min-w-\[120px\] { min-width: 120px; }
.max-w-xs { max-width: 320px; } /* 20rem */
.max-w-md { max-width: 448px; } /* 28rem */
.max-w-lg { max-width: 512px; } /* 32rem */
.max-w-xl { max-width: 576px; } /* 36rem */
.max-w-full { max-width: 100%; }
/* Min/Max Height */
.min-h-0 { min-height: 0; }
.min-h-full { min-height: 100%; }
.min-h-screen { min-height: 100vh; }
.max-h-40 { max-height: 160px; } /* 10rem */
.max-h-screen { max-height: 100vh; }
3. Typography (Text, Font, Line, Letter)
/* Font size */
.text-xs { font-size: 12px; line-height: 16px; } /* 0.75rem */
.text-sm { font-size: 14px; line-height: 20px; } /* 0.875rem */
.text-base { font-size: 16px; line-height: 24px; } /* 1rem */
.text-lg { font-size: 18px; line-height: 28px; } /* 1.125rem */
.text-xl { font-size: 20px; line-height: 28px; } /* 1.25rem */
.text-2xl { font-size: 24px; line-height: 32px; } /* 1.5rem */
.text-3xl { font-size: 30px; line-height: 36px; } /* 1.875rem */
.text-4xl { font-size: 36px; line-height: 40px; } /* 2.25rem */
.text-5xl { font-size: 48px; line-height: 16px; } /* 3rem */
/* Font weight */
.font-thin { font-weight: 100; }
.font-extralight{ font-weight: 200; }
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }
/* Line height */
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-normal { line-height: 1.5; }
.leading-relaxed{ line-height: 1.625; }
.leading-loose { line-height: 2; }
/* Letter spacing */
.tracking-tighter { letter-spacing: -0.8px; } /* -0.05em */
.tracking-tight { letter-spacing: -0.4px; } /* -0.025em */
.tracking-normal { letter-spacing: 0; } /* 0em */
.tracking-wide { letter-spacing: 0.4px; } /* 0.025em */
.tracking-wider { letter-spacing: 0.8px; } /* 0.05em */
.tracking-widest { letter-spacing: 1.6px; } /* 0.1em */
/* Text alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify{ text-align: justify; }
1. Display (표시 방식)
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.inline-grid { display: inline-grid; }
.hidden { display: none; }
.flex-row { flex-direction: row; }
.flex-row-reverse { flex-direction: row-reverse; }
.flex-col { flex-direction: column; }
.flex-col-reverse { flex-direction: column-reverse; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.items-stretch { align-items: stretch; }
.gap-0 { gap: 0; }
.gap-1 { gap: 4px; } /* 0.25rem */
.gap-2 { gap: 8px; } /* 0.5rem */
.gap-3 { gap: 12px; } /* 0.75rem */
.gap-4 { gap: 16px; } /* 1rem */
.gap-5 { gap: 20px; } /* 1.25rem */
.gap-6 { gap: 24px; } /* 1.5rem */
.gap-8 { gap: 32px; } /* 2rem */
.gap-10 { gap: 40px; } /* 2.5rem */
.gap-x-4 { column-gap: 16px; } /* 1rem */
.gap-y-6 { row-gap: 24px; } /* 1.5rem */
2. Overflow (오버플로우 제어)
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-visible { overflow: visible; }
.overflow-scroll { overflow: scroll; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-hidden { overflow-x: hidden; }
.overflow-y-hidden { overflow-y: hidden; }
.overflow-x-scroll { overflow-x: scroll; }
.overflow-y-scroll { overflow-y: scroll; }
3. Z-Index
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.z-auto { z-index: auto; }
4. Object Fit & Position (이미지/비디오용)
.object-contain { object-fit: contain; }
.object-cover { object-fit: cover; }
.object-fill { object-fit: fill; }
.object-none { object-fit: none; }
5. Position
.static { position: static; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.inset-x-0 { left: 0; right: 0; }
.inset-y-0 { top: 0; bottom: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.top-1/2 { top: 50%; }
.left-1/2 { left: 50%; }
1. Border Width & Style
.border { border-width: 1px; }
.border-0 { border-width: 0; }
.border-2 { border-width: 2px; }
.border-4 { border-width: 4px; }
.border-8 { border-width: 8px; }
.border-x-2 { border-left-width: 2px; border-right-width: 2px; }
.border-y-4 { border-top-width: 4px; border-bottom-width: 4px; }
.border-t { border-top-width: 1px; }
.border-r { border-right-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-l { border-left-width: 1px; }
.border-solid { border-style: solid; }
.border-none { border-style: none; }
.border-transparent { border-color: transparent; }
.border-black { border-color: #000; }
.border-white { border-color: #fff; }
.border-gray-300 { border-color: #d1d5db; }
.border-red-500 { border-color: #ef4444; }
.border-blue-500 { border-color: #3b82f6; }
.rounded { border-radius: 4px; } /* 0.25rem */
.rounded-sm { border-radius: 2px; } /* 0.125rem */
.rounded-md { border-radius: 6px; } /* 0.375rem */
.rounded-lg { border-radius: 8px; } /* 0.5rem */
.rounded-xl { border-radius: 12px; } /* 0.75rem */
.rounded-2xl { border-radius: 16px; } /* 1rem */
.rounded-3xl { border-radius: 24px; } /* 1.5rem */
.rounded-full { border-radius: 9999px; } /* 완전 원형 */
.rounded-t-lg {
border-top-left-radius: 8px; /* 0.5rem */
border-top-right-radius: 8px; /* 0.5rem */
}
.rounded-b-md {
border-bottom-left-radius: 6px; /* 0.375rem */
border-bottom-right-radius: 6px; /* 0.375rem */
}
.rounded-l-full {
border-top-left-radius: 9999px; /* 완전 원형 */
border-bottom-left-radius: 9999px;/* 완전 원형 */
}
2. Background Color
.bg-transparent { background-color: transparent; }
.bg-black { background-color: #000; }
.bg-white { background-color: #fff; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-900 { background-color: #111827; }
.bg-red-500 { background-color: #ef4444; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-green-500 { background-color: #22c55e; }
.bg-auto { background-size: auto; }
.bg-cover { background-size: cover; }
.bg-contain { background-size: contain; }
.bg-no-repeat { background-repeat: no-repeat; }
.bg-repeat { background-repeat: repeat; }
3. Opacity
.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }
댓글