Question · Vibe coding with Claude Code course · Module 11: Spotify clone

Two hover classes on one row

A playlist row has the classes hover:bg-white hover:bg-white/10. What do you do about it?

Answer options

  • You keep one class, because the result is decided by the order of rules in the CSS Tailwind generated, and the other only confuses
  • Nothing, because the last class in className always wins
  • Nothing, because Tailwind merges both classes into one semi-transparent colour
  • You swap the order of the classes in className so that bg-white/10 wins

You can check the correct answer by solving this task in the CodeWorlds game.