TailwindCss
Copied from CSS/tailwindcss
yarn add -D tailwindcss autoprefixer cssnano
npx tailwind init tailwind.config.js --full@tailwind base;/* Preflight will be injected here */
/*Put all classes here*/
@tailwind components;
@tailwind utilities;Gatsby Specific
yarn add gatsby-plugin-postcssrequire("./static/css/index.css");const tailwindConfig = require("./tailwind.config.js");
{
resolve: `gatsby-plugin-postcss`,
options: {
postCssPlugins: [
require(`tailwindcss`)(tailwindConfig),
require(`autoprefixer`),
...(process.env.NODE_ENV === `production`
? [require(`cssnano`)]
: []),
],
},
},Last updated