Tailwind CSS is one of the hottest topics in frontend development right now. A utility first CSS framework, created by Adam Wathan, which over the past few years has grown from side project to successful business. If you’ve ever used Tailwind, you may be aware that it utilizes PurgeCSS at build time to prune unused styles and create a slimline stylesheet made up of only the classes used in your web application. Many frameworks now make use of PurgeCSS to remove unnecessary bulk from production stylesheets at build time and you can use it in Nuxt too. When creating a new project in Nuxt and selecting the Tailwind preset, PurgeCSS will be installed automatically, although you can utilize it in any project using the nuxt-purgecss build module.

PurgeCSS is a fantastic plugin, however, it cannot parse or run JavaScript and in most cases is only used at build time. Because of this, it can lead to unexpected inconsistencies between development and production environments if used incorrectly.

#tailwind-css #javascript #nuxtjs #vuejs #tailwind

Dynamic component styles in Nuxt using Tailwind CSS and Lookup tables
9.10 GEEK