Loading tutorials
Intermediate · Mid: 15 chapters · 34 min read. States assumed prerequisites
Start readingclass attribute, and the CSS box model (content, padding, margin, border). You should also recognize CSS units such as px, rem, and percentages. You need a project with Tailwind CSS installed.class attribute. It also assumes a working Tailwind project. The previous chapter showed that each utility class maps to a CSS declaration. Here you will see how the number in a class such as `p-4 maps to a length (1rem in the default theme, because each step is 0.25rem). Here you apply that scale to padding and margin.w-* and h-* utilities, the spacing scale, and the CSS properties min-width, max-width, min-height and max-height. Setting a size says what you want. A min or max utility sets a limit that the browser enforces when the container or content would push the px and rem. It also assumes a project with Tailwind CSS installed. You will learn how the text-* size utilities work and why each one also sets a line height.text-sm, text-3xl) and how a class name maps to one CSS declaration. It covers the two utility families that fine-tune how text is spaced: leading-* for line height and tracking-* for letter spacing.w-* and max-w-* utilities. Here you will apply them to limit how wide a block of text can grow.p-4, gap-6) and the font-size utilities (text-lg). It also assumes you know whether your project uses Tailwind v3 (a tailwind.config.js file) or v4 (CSS-first configuration).p-/m- utilities, flex gap-*, max-w-*, font size and leading utilities, and the md: breakpoint prefix. It also assumes Tailwind v3.4 or later,