Question · Vibe coding with Claude Code course · Module 2: A Next.js project with Claude Code

Quiz: Tailwind dark mode

What does the dark: prefix do in a Tailwind class (e.g. dark:bg-gray-900)?

Answer options

  • Darkens every color by half
  • Hides the element at night
  • Sets the background permanently to black
  • Applies the style only in dark mode
Show the answer

Correct answer:

  • Applies the style only in dark mode