Last active
February 12, 2022 07:07
-
-
Save iKunalmathur/1878af2952d572691bea0c78204ca8b1 to your computer and use it in GitHub Desktop.
Tailwind 3 Starter 2022
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm init -y | |
npm install -D tailwindcss @tailwindcss/typography @tailwindcss/forms @tailwindcss/line-clamp @tailwindcss/aspect-ratio | |
npx tailwindcss init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
content: ["./src/**/*.{html,js}"], | |
theme: { | |
extend: {}, | |
}, | |
plugins: [ | |
require("@tailwindcss/typography"), | |
require("@tailwindcss/forms"), | |
require("@tailwindcss/aspect-ratio"), | |
require('@tailwindcss/line-clamp'), | |
], | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
"scripts": { | |
"dev": "npx tailwindcss -i ./src/tailwind.css -o ./dist/output.css --watch" | |
}, | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* src/tailwind.css */ | |
@tailwind base; | |
@tailwind components; | |
@tailwind utilities; | |
@layer base{ | |
} | |
@layer components{ | |
} | |
@layer utilities{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- src/index.html --> | |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link href="/dist/output.css" rel="stylesheet"> | |
</head> | |
<body> | |
<h1 class="text-3xl font-bold underline"> | |
Hello world! | |
</h1> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment