Skip to content

Antoine-Flo/tuto-tailwind

Repository files navigation

Installation

1 - Commandes

Run : npm init -y
Run : npm install -D tailwindcss postcss-cli autoprefixer
Run : npx tailwindcss init -p

2 - Créer dossier et fichiers

public => index.html
src => tailwind.css

3 - Dans tailwind.css

Ajouter

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {

}

@layer components {

}

3 - Build

Ajouter dans le package.json : script => "build": "postcss -w src/tailwind.css -o public/style.css"
Run : npm run build

4 - Extension

Installer : Tailwind CSS IntelliSense

5 - Purge

Ajouter dans tailwind.config.js : purge => ./public/index.html
Run : $env:NODE_ENV="production"
Run : npm run build

Ajouter @tilwind rule pour éviter le bug https://stackoverflow.com/questions/47607602/how-to-add-a-tailwind-css-rule-to-css-checker

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages