diff options
author | 2022-02-17 12:39:55 +0000 | |
---|---|---|
committer | 2022-02-17 07:39:55 -0500 | |
commit | 934d9750cfb9f6d3c0adcc0aabd0c56890b9ce9b (patch) | |
tree | 99191f8301a8db9a616bbb982ed69906b0726812 /examples/with-tailwindcss/src | |
parent | c496ac8dad328f89e8a8be24b4adab68f52f5aef (diff) | |
download | astro-934d9750cfb9f6d3c0adcc0aabd0c56890b9ce9b.tar.gz astro-934d9750cfb9f6d3c0adcc0aabd0c56890b9ce9b.tar.zst astro-934d9750cfb9f6d3c0adcc0aabd0c56890b9ce9b.zip |
importing and inlining global.css with set:html (#2601)
Diffstat (limited to 'examples/with-tailwindcss/src')
-rw-r--r-- | examples/with-tailwindcss/src/pages/index.astro | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/with-tailwindcss/src/pages/index.astro b/examples/with-tailwindcss/src/pages/index.astro index 74c3b2e62..6a5ca8f96 100644 --- a/examples/with-tailwindcss/src/pages/index.astro +++ b/examples/with-tailwindcss/src/pages/index.astro @@ -1,6 +1,8 @@ --- // Component Imports import Button from '../components/Button.astro'; +// Imports the global styles to be inlined in the <head> +import styles from '../styles/global.css'; // Full Astro Component Syntax: // https://docs.astro.build/core-concepts/astro-components/ @@ -11,9 +13,7 @@ import Button from '../components/Button.astro'; <meta charset="UTF-8" /> <link rel="icon" type="image/x-icon" href="/favicon.ico" /> <title>Astro + TailwindCSS</title> - <style global> - @import "../styles/global.css"; - </style> + <style set:html={styles}></style> </head> <body> |