Tailwind CSS
A utility-first CSS framework for building custom designs directly in your markup.
레슨 17개
Tailwind CSS
코스 시작하기Getting Started
- What Is Tailwind CSS?Why Tailwind styles HTML with small, single-purpose classes instead of writing custom CSS files.
- Setting Up Tailwind CSSHow Tailwind's build pipeline turns the classes in your markup into a single generated CSS file.
- Your First Utility ClassesBuilding a simple card component to see how naming conventions and value scales work across Tailwind's utilities.
Core Utility Categories
- Spacing and SizingPadding, margin, gap, width, and height utilities, and the numeric scale they all share.
- Colors and BackgroundsHow Tailwind's color-and-shade naming system works, and applying it to text, backgrounds, and borders.
- Typography UtilitiesControlling font size, weight, line height, alignment, and text overflow with utility classes.
- Borders, Shadows, and EffectsBorder width, radius, and color, plus box shadows, opacity, and other visual effect utilities.
Responsive and Interactive Design
- Responsive Design with BreakpointsUsing sm:, md:, and lg: prefixes to change styles at different viewport widths, mobile-first.
- Hover, Focus, and State VariantsStyling interactive states like hover, focus, and disabled with variant prefixes instead of pseudo-classes.
- Dark ModeStyling a dark theme alongside a light one using the dark: variant, and choosing between OS-driven and manual toggling.
Layout with Flexbox and Grid
Customization and Reuse
- Customizing the ThemeDefining brand colors, custom spacing, and fonts as CSS variables in @theme instead of a JS config file.
- Arbitrary ValuesUsing square-bracket syntax like w-[13px] to reach exact values outside Tailwind's design scales, and when that's appropriate.
- Reusing Styles and @applyExtracting repeated utility combinations into components instead of leaning on @apply, and when @apply is still worth it.
Tailwind in Practice