[CSS] Tailwind CSS(1)

๋ฐฑ์„ธํฌยท2025๋…„ 3์›” 2์ผ

๐Ÿคš๋“ค์–ด ๊ฐ€๊ธฐ ์ „
์ด css ๋ฅผ ๋“ค์–ด ๋ณธ ๊ธฐ์–ต์€ ์˜ค๋ž˜ ์ „ ๋ถ€ํ„ฐ์ธ๋ฐ์š”,
์˜ค๋Š˜๋ถ€ํ„ฐ ์กฐ๊ธˆ์”ฉ ๋น ๋ฅด๊ฒŒ ๊ณต๋ถ€ํ•ด ๋ณด๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค.

์ผ๋‹จ, '์ด CSS ์ด๋ฆ„์ด ๋ญ์•ผ?' ์‹ถ์—ˆ์Šต๋‹ˆ๋‹ค.
๋ฐœ์Œ์ด ๋„ˆ๋ฌด ์–ด๋ ค์›Œ ๋ณด์ด์ž–์•„์š” ใ…Žใ…Ž
ํ…Œ์ผ์œˆ๋“œ ๋ผ๊ณ  ๋ถ€๋ฅด๋„ค์š”.

๊ณต์‹ ์‚ฌ์ดํŠธ๋Š” ์•„๋ž˜์˜ url์ž…๋‹ˆ๋‹ค๐Ÿ”ฝ
https://tailwindcss.com/

Tailwind CSS์˜ ํŠน์ง•

Rapidly build modern websites without ever leaving your HTML.
A utility-first CSS framework packed with classes like flex, pt-4, text-center and rotate-90 that can be composed to build any design, directly in your markup.
์ถœ์ฒ˜: ๊ณต์‹์‚ฌ์ดํŠธ, https://tailwindcss.com/

์™œ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š”๊ฐ€?

์žฅ์ 

https://reveur1996.tistory.com/140 ,๊ฟˆ๊พธ๋Š” ๊ฐœ๋ฐœ์ž
์œ„์˜ ํฌ์ŠคํŒ… ๊ธ€์—์„œ ์„ค๋ช…์ด ์ž์„ธํžˆ ๋˜์–ด์žˆ๋„ค์š”~ ์ฝ์–ด๋ณด์‹œ๊ธธ ์ถ”์ฒœํ•ฉ๋‹ˆ๋‹ค:)

Tailwind CSS ์„ค์น˜


๊ณต์‹๋ฌธ์„œ๋ฅผ ๋ณด๋ฉด ์„ค์น˜ ๋ฐฉ๋ฒ•์ด ๋‚˜์™€์žˆ๋‹ค.
๋‚˜๋Š” Play CDN์„ ์‚ฌ์šฉํ•  ๊ฒƒ์ด๋‹ค.

์Šคํฌ๋ฆฝํŠธ ํƒœ๊ทธ๋งŒ ํฌํ•จํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค~

<!doctype html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script src="https://unpkg.com/@tailwindcss/browser@4"></script>
  </head>
  <body>
    <h1 class="text-3xl font-bold underline">
      Hello world!
    </h1>
  </body>
</html>

Tailwind CSS IntelliSense ์„ค์น˜

1๋ฒˆ์งธ ๋ฐฉ๋ฒ•

์ž๋™์™„์„ฑ ๊ธฐ๋Šฅ์„ ์œ„ํ•ด์„œ ์„ค์น˜

1. ctrl + shift + p ๋ˆ„๋ฅธ ๋’ค,
Preferences: Open User Settings(JSON) ์„ ํƒ

2.์ฝ”๋“œ ์ถ”๊ฐ€

"files.associations": {
    "*.html": "html",
    "*.css": "tailwindcss"
  },
  "editor.quickSuggestions": {
    "strings": true
  }
  1. ๊ทธ๋Ÿผ์—๋„, ์ž๋™์™„์„ฑ์ด ์•ˆ ๋˜์—ˆ๋‹ค.
    ์•„๋ž˜ ๋‚ด์šฉ์„ ํ†ตํ•ด ์•Œ ์ˆ˜ ์žˆ์—ˆ๋‹ค.
    tailwind.config.js ํŒŒ์ผ์„ ์ƒ์„ฑํ•ด์„œ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค~

    https://newstroyblog.tistory.com/497, ์ตœ๋ฅ˜ํ˜„์˜ ์ปดํ“จํ„ฐ ์ •๋ณด๊ณต๊ฐ„ ์—์„œ ์ฐธ๊ณ 

2 ๋ฒˆ์งธ ๋ฐฉ๋ฒ•

tailwind.config.js์— ์ฝ”๋“œ ์ถ”๊ฐ€

 /** @type {import('tailwindcss').Config} */
export default {
   content: ["./src/**/*.{html,js}"],
   theme: {
     extend: {},
   },
   plugins: [],
 }

tailwind CSS ๊ณต์‹๋ฌธ์„œ ์ฐธ๊ณ , https://v3.tailwindcss.com/docs/installation
v4 ํŽ˜์ด์ง€์˜ ๋‚ด์šฉ์€ ์•„๋‹˜ ์ฃผ์˜

profile
ํ”„๋ก ํŠธ์—”๋“œ

0๊ฐœ์˜ ๋Œ“๊ธ€