Demonstrating usage of Tailwind CSS in a Gatsby project.
gatsby new gatsby-starter-hello-world https://github.com/gatsbyjs/gatsby-starter-hello-world
npm install tailwindcss --save-dev
npx tailwindcss init
npm install --save gatsby-plugin-postcss
plugins: [`gatsby-plugin-postcss`,]
module.exports = () => (
{
plugins: [require('tailwindcss'),],
}
);
@tailwind base;
@tailwind components;
@tailwind utilities;
import './src/styles/index.css';
module.exports = {
purge: ['.src/pages/*.js',],
}
Tailwind CSS: https://tailwindcss.com/
Include Tailwind CSS to a Gatsby project: https://www.gatsbyjs.org/docs/tailwind-css/
Gatsby starters: https://www.gatsbyjs.org/docs/starters/
gatsby-starter-hello-world: https://www.gatsbyjs.org/starters/gatsbyjs/gatsby-starter-hello-world/