DEV Community

Discussion on: Building my site with Tailwind CSS

Collapse
 
jeremyrobert profile image
Jérémy ROBERT

Thank you for this interesting article, i love Tailwind ! Do you use PurgeCSS? If yes, I think you should modify this part of your code :

<CustomVueTitleComponent color="blue">
<CustomVueTitleComponent color="red">
<CustomVueTitleComponent color="green">

<!-- CustomVueTitleComponent.vue -->

<template>
  <h1 class="bold text-2x" :class="`text-${color}`"></h1>
</template>

To :

<CustomVueTitleComponent color="text-blue">
<CustomVueTitleComponent color="text-red">
<CustomVueTitleComponent color="text-green">

<!-- CustomVueTitleComponent.vue -->

<template>
  <h1 class="bold text-2x" :class="color"></h1>
</template>

tailwindcss.com/docs/controlling-f...

Collapse
 
samanthaming profile image
Samantha Ming

WOOOO, thanks for introducing me to PurgeCSS 🤩 I'm using VuePress, which uses PostCSS ... but I wonder if it's redundant to have both? -- but they do different things, so maybe I should include it 🤔