한 달 인턴으로 나갔을 때 계시던 개발자 분이 알려주신 tailwind css. css는 참 종류가 많구나 라고 느껴졌다. 새로운 기술을 발견하면 내가 이 기술을 써야하는 이유와 쓰지 않아야 하는 이유를 알아야 한다는 걸 느껴서 한 번 어떤 장단점이 있는지 알아보려고 글을 남긴다.
npx create-react-app my-project
cd my-project
npm install -D tailwindcss
npx tailwindcss init
// tailwind.config.js
module.exports = {
content: [
"./src/**/*.{js,jsx,ts,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}
//index.css
@tailwind base;
@tailwind components;
@tailwind utilities;
export default function App() {
return (
<h1 className="text-3xl font-bold underline">
Hello world!
</h1>
)
}