Extracting Tailwind constants using theme

Posted on Jul 25, 2022

When using tailwind, you might be forced to manually write SCSS by hand. With @apply some classes; you can embed whole classes with all their styles into your own rules.

But sometimes you need to only acces one single constant. Like accessing an animation timeout, default paddings, fonts or a color for some cases.

That’s possible with a simple theme('colors.primary').