Tailwind Config

πŸ¦‰ Tailwind has a fantastic πŸ“œ default theme β€” you can build a surprisingly large number of project without ever deviating at all from those defaults.
In this particular workshop design though, there are a few new design values that land outside of Tailwind's defaults.

Tailwind theme customisation

πŸ‘¨β€πŸ’Ό The Figma design contains a handful of traits that are not part of the default Tailwind theme. They were kind enough to communicate some of these custom values in Figma, so make sure you honour that by transposing all those custom values to the Tailwind theme:
  • a custom font family called Poppins (Google font)
  • custom min-widths for the sm (520px) and lg (976px) breakpoints
  • custom 4.5xl and 5.5xl font sizes for the heading tag
  • a custom highlight color of #6202FF
πŸ§β€β™‚οΈ I went ahead and added the necessary Google Font tags in for the Poppins font. It's ready to be wired with Tailwind!

Time to get to work

In Tailwind CSS v4, the theme configuration will be moving to a CSS file instead. At the time of this workshop, it's just too early (and experimental) to go with v4, so we're sticking with the JS config.
In the last exercise of this workshop, we'll convert our entire project to Tailwind v4, so you can also learn the new config and prepare for when v4 ships!
🐨 Implement the custom font family, breakpoints, font sizes and color in the Tailwind theme.
🐨 Add the font-poppins class to the body tag in
πŸ’° Tip: make sure you include the index.html file in the Tailwind config's πŸ“œ content array, since it's now using Tailwind classes!
🐨 In , wrap the word "Epic" in the h1 tag inside a span with a text-highlight classname, to check if the highlight color works.

Please set the playground first

Loading "Tailwind Config"
Loading "Tailwind Config"
Login to get access to the exclusive discord channel.