Recall & Review
beginner
What is Tailwind CSS?
Tailwind CSS is a utility-first CSS framework that lets you style your web pages by applying small, reusable classes directly in your HTML or JSX. It helps you build designs quickly without writing custom CSS.
Click to reveal answer
beginner
How do you add Tailwind CSS to a Next.js project?
You install Tailwind via npm, create a Tailwind config file, and include Tailwind directives in your global CSS file. Then, you import this CSS in your Next.js app, usually in the _app.js or layout.tsx file.Click to reveal answer
beginner
Why use Tailwind CSS with Next.js?
Tailwind helps you style components quickly with utility classes, and Next.js makes building React apps easy. Together, they speed up development and keep your styles consistent and maintainable.
Click to reveal answer
intermediate
What is the purpose of the
tailwind.config.js file in a Next.js project?It lets you customize Tailwind’s default settings like colors, fonts, and breakpoints. You can also add plugins or extend utilities to fit your design needs.
Click to reveal answer
intermediate
How do you make a responsive layout using Tailwind in Next.js?
Use Tailwind’s responsive prefixes like
sm:, md:, lg: before utility classes to apply styles at different screen sizes. For example, md:text-lg makes text larger on medium screens and up.Click to reveal answer
Which command installs Tailwind CSS in a Next.js project?
✗ Incorrect
You need to install tailwindcss along with postcss and autoprefixer for Tailwind to work properly in Next.js.
Where do you import your global Tailwind CSS file in a Next.js app?
✗ Incorrect
The global CSS file with Tailwind directives is imported once in _app.js or layout.tsx to apply styles app-wide.
What does the class
p-4 do in Tailwind CSS?✗ Incorrect
In Tailwind,
p-4 means padding of 1rem (16px by default) on all sides.How do you apply a style only on medium screens and larger in Tailwind?
✗ Incorrect
The
md: prefix applies styles starting at the medium breakpoint and up.What is the main benefit of utility-first CSS like Tailwind?
✗ Incorrect
Utility-first CSS lets you build designs by applying small classes directly, reducing the need for custom CSS files.
Explain how to set up Tailwind CSS in a new Next.js project from scratch.
Think about the installation steps and where to add styles.
You got /4 concepts.
Describe how Tailwind’s responsive prefixes work and give an example.
Focus on how to make designs adapt to screen sizes.
You got /3 concepts.