Loading tutorials
flex, p-4 and text-lg, and what a CSS media query is. You will learn how Tailwind decides which styles apply at which width, and how to write markup that fol7 min readflex, p-4 and text-lg. It also assumes you know a CSS me7 min readflex, p-4 and text-lg, and that you know what a CSS media query is. Earlier chapters covered the viewport meta tag, the mobile-first model and the defaul6 min readflex, p-4 and text-lg, and what a CSS media query is. You should also know that Tailwind is mobile-first: an unprefixed utility applies at every width, and a prefixed utility such as md: applies at that wi7 min readmd: to utilities. It also assumes you are comfortable with flexbox, grid and media queries. Most responsive bugs in Tailwind come from a small set of wrong mental models. Each section below names a mistake, sho7 min readsm, md, lg, xl and 2xl prefixes and why unprefixed utilities apply at every width. It also assumes you have used state variants such as hover: and focus: on their own. Here you will combine them. You will see how Tailwind reads a stacked class, which c6 min readmax-* variants and how to combine them with min breakpoints to style a limited width range. It assumes you know the mobile-first model, the default breakpoints and basic breakpoint prefixes from earlier chapters. It also assumes you are on Tailwind v3.2 or later, because 6 min readsm, md, lg, xl, 2xl), the mobile-first model, and how breakpoint prefixes apply to utilities. It also assumes you can read a basic CSS file and a JavaScript config file. You will learn how to add, rename, override and remove breakpoint6 min readmd: and max-lg: prefixes work. It also assumes you can read a basic CSS media query. The examples use Tailwind v4, where container queries are built in. A note on v3 appears near the end.6 min readsm:, md: and max-* variants combine. It covers how to check that a layout works at every width and how to find the cause when it doesn't.7 min read