learn tailwind css
Tailwind is a CSS framework made up of utility classes.
npm install tailwindcss
npm run build-css
using postcss to watch the code change. pro: postcss watch the css change and auto compile src to output
npm install postcss-cli tailwindcss autoprefixer
/src/styles.css -> the source file, is where to put the tailwind code
/public/styles.css -> is the output file
@tailwind base;
@tailwind components;
@tailwind utilities;
"scripts": {
"build-css": "tailwindcss build -i ./src/styles.css -o ./public/styles.css ",
"watch-css": "postcss ./src/styles.css -o ./public/styles.css --watch"
},
module.exports = {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
],
}
npm run watch-css