summaryrefslogtreecommitdiff
path: root/examples/tailwindcss
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tailwindcss')
-rw-r--r--examples/tailwindcss/astro.config.mjs5
-rw-r--r--examples/tailwindcss/package.json2
-rw-r--r--examples/tailwindcss/public/global.css3
-rw-r--r--examples/tailwindcss/src/components/Button.astro5
-rw-r--r--examples/tailwindcss/src/pages/index.astro4
5 files changed, 10 insertions, 9 deletions
diff --git a/examples/tailwindcss/astro.config.mjs b/examples/tailwindcss/astro.config.mjs
new file mode 100644
index 000000000..7e6aaa3fd
--- /dev/null
+++ b/examples/tailwindcss/astro.config.mjs
@@ -0,0 +1,5 @@
+export default {
+ devOptions: {
+ tailwindConfig: './tailwind.config.js',
+ },
+};
diff --git a/examples/tailwindcss/package.json b/examples/tailwindcss/package.json
index a6a481ff1..4794d6d4c 100644
--- a/examples/tailwindcss/package.json
+++ b/examples/tailwindcss/package.json
@@ -9,7 +9,7 @@
},
"devDependencies": {
"astro": "^0.10.0",
- "tailwindcss": "^2.1.1"
+ "tailwindcss": "^2.1.2"
},
"snowpack": {
"workspaceRoot": "../.."
diff --git a/examples/tailwindcss/public/global.css b/examples/tailwindcss/public/global.css
new file mode 100644
index 000000000..b5c61c956
--- /dev/null
+++ b/examples/tailwindcss/public/global.css
@@ -0,0 +1,3 @@
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
diff --git a/examples/tailwindcss/src/components/Button.astro b/examples/tailwindcss/src/components/Button.astro
index ac13d7a49..64baa50ae 100644
--- a/examples/tailwindcss/src/components/Button.astro
+++ b/examples/tailwindcss/src/components/Button.astro
@@ -1,8 +1,3 @@
-<style>
- @tailwind components;
- @tailwind utilities;
-</style>
-
<button class="py-2 px-4 bg-green-500 text-white font-semibold rounded-lg shadow-md hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-green-400 focus:ring-opacity-75">
<slot />
</button>
diff --git a/examples/tailwindcss/src/pages/index.astro b/examples/tailwindcss/src/pages/index.astro
index e062f1f5b..00ac41dac 100644
--- a/examples/tailwindcss/src/pages/index.astro
+++ b/examples/tailwindcss/src/pages/index.astro
@@ -6,9 +6,7 @@ import Button from '../components/Button.astro';
<head>
<meta charset="UTF-8" />
<title>Astro + TailwindCSS</title>
- <style>
- @tailwind base;
- </style>
+ <link rel="stylesheet" type="text/css" href="/global.css">
</head>
<body>