Interview Q&A · questions with model answers
Tailwind CSS Interview Questions
Part of the study plan for: Frontend Engineer
Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.
-
Most asked What is Tailwind CSS and what does 'utility-first' mean?
Tailwind is a CSS framework of small, single-purpose classes (utilities) such as p-4, flex and text-sky-600. Utility-first means you build designs by combining these classes in your markup instead…
-
Most asked What changed in Tailwind CSS v4 compared with v3?
A new, much faster engine; CSS-first configuration (@import "tailwindcss" and @theme instead of tailwind.config.js and @tailwind directives); automatic content detection; OKLCH colours; built-in…
-
What are container queries in Tailwind and when do you use them?
Mark a parent with @container; children use @sm:, @md:, @lg: and so on, which respond to the container's width rather than the viewport. Use them for reusable components (cards, widgets) that appear…
-
What are arbitrary values and when should you avoid them?
Square-bracket values for one-offs: w-[37rem], bg-[#0f766e], grid-cols-[1fr_2fr], plus arbitrary properties ([mask-type:luminance]) and variants ([&>li]:py-1). Avoid them for design decisions such…
-
What is Preflight and how do you style rich text from a CMS?
Preflight is Tailwind's base reset (built on modern-normalize) that removes default margins, heading sizes and list styles. CMS HTML without classes therefore looks unstyled. Use the typography…
-
What are good practices for writing Tailwind in a team?
Write complete class names; extract components; use theme tokens instead of arbitrary values; sort classes with the Prettier plugin; use the IntelliSense editor extension; design mobile first; keep…