npm init -y
npm install tailwindcss postcss-cli autoprefixer
npx tailwind init
touch postcss.config.js
- Add plugins require to
postcss.config
file - Create new
css/tailwind.css
file - Add
@tailwind base, components, utilities
totailwind.css
- Add
build
script topackage.json
file - Run
npm run build
- Create
index.html
npm install -g live-server
- Run
live-server docs
- Enable
active
variants for background colors intailwind.config
by addingbackgroundColor: ['responsive', 'hover', 'focus', 'active']
. (When one utility is added, you need to add all.) - When changes are made to the config run
npm run build
- Add
watch
line to package.json to monitor changes in thetailwind.css
- Run
npm run watch
- Run
live-server docs
- Run
npm run watch