Loading tutorials
flex, `6 min readflex, px-4, and bg-blue-600. It also assumes you can read a basic component or template, such as a React component, a Vue single-file component, or a server-side partial. It does not use @apply yet. The goal is to learn when you 5 min readpx-4 and bg-blue-600. It also assumes you have used a component framework such as React, or template partials. The examples use React. The same steps work in Vue, Svelte, or a server-side partial.5 min readpx-4 and hover:bg-blue-700. It also assumes you have already extracted a repeated button into a single component. Here you will make that component produce several visual versions of7 min readButton component with a variants map from the previous chapter. Here you will see what goes wrong when a componen6 min read@apply directive: what it does, how to write a component class with it, and where it behaves differently from plain utilities. It assumes you know basic HTML and CSS (classes and the cascade), common Tailwind utilities such as flex, px-4, and bg-blue-500, and the idea5 min read@apply, and why that placement decides which styles win when two rules conflict. It assumes you can read basic CSS, know the cascade and specificity, and have used Tailwind utilities such as px-4 and bg-blue-600. The examples use 5 min read@apply rule and know where @layer components fits. If you can't yet, read the previous two chapters first. Examples target Tailwind CSS v4. Where v3 differs, the text says so.5 min read@apply and @layer components from earlier in the tutorial. You should also be comfortable with Vue single-file components or Svelte components, and know what a CSS module is. The examples use Tailwind CSS v4, and the version differences are noted where6 min read@apply and @layer components work, and that you use Tailwind CSS v4 (v3 differences are noted). It covers how to register your own utility classes so they behave like built-in ones. That means they work with hover:, md:, dark: and other variants, they are 5 min read@apply. It also assumes you know the cascade, specificity, and basic Tailwind CSS v4 syntax (@import "tailwindcss", @theme, @layer). Examples use v4. Where v3 behaved differently, the te6 min readflex, px-4, and bg-blue-500, and have used a component framework such as React or Vue, or at least template partials. You have now seen three ways to stop repeating long class list6 min read