진짜 킹받게 하지말고;;; 좋은 말로 할 때 적용돼라;

1. 설치

<aside> 🥕

npm install -D tailwindcss postcss autoprefixer

npx tailwindcss init -p

</aside>

2. config 설정 2가지

  1. post.config.js
module.exports = {
  plugins: {
    tailwindcss: {},
    autoprefixer: {},
  },
}
  1. tailwind.config.js
/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    './app/**/*.{js,ts,jsx,tsx,mdx}',
    './pages/**/*.{js,ts,jsx,tsx,mdx}',
    './components/**/*.{js,ts,jsx,tsx,mdx}',

    // Or if using `src` directory:
    './src/**/*.{js,ts,jsx,tsx,mdx}',
  ],
  theme: {
    extend: {},
  },
  plugins: [],
};

3. globals.css 에 3가지

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