diff options
author | 2021-11-04 14:01:28 -0600 | |
---|---|---|
committer | 2021-11-04 14:01:28 -0600 | |
commit | 2e1bded735f3e2149c3ff95b1c131a147dda0f34 (patch) | |
tree | 1f4433cad8db49e5be6ae8bbc4f277de9d5fa7e0 /docs/src | |
parent | 2c5e67bb44398080037c02fbdd756cc66e757f1e (diff) | |
download | astro-2e1bded735f3e2149c3ff95b1c131a147dda0f34.tar.gz astro-2e1bded735f3e2149c3ff95b1c131a147dda0f34.tar.zst astro-2e1bded735f3e2149c3ff95b1c131a147dda0f34.zip |
Get Tailwind HMR working (first cut) (#1736)
* Get Tailwind HMR working
* PR feedback
* perf: improve HMR `head` performance
Co-authored-by: Nate Moore <nate@skypack.dev>
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/pages/guides/styling.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/src/pages/guides/styling.md b/docs/src/pages/guides/styling.md index 98df62b8a..a42d759df 100644 --- a/docs/src/pages/guides/styling.md +++ b/docs/src/pages/guides/styling.md @@ -235,6 +235,14 @@ Now you're ready to write Tailwind! Our recommended approach is to create a `src @tailwind utilities; ``` +Lastly, add it to your Astro page (or layout template): + +```astro +<head> + <link rel="stylesheet" href={Astro.resolve('../styles/global.css')}> +</head> +``` + As an alternative to `src/styles/global.css`, You may also add Tailwind utilities to individual `pages/*.astro` components in `<style>` tags, but be mindful of duplication! If you end up creating multiple Tailwind-managed stylesheets for your site, make sure you're not sending the same CSS to users over and over again in separate CSS files. #### Migrating from v0.19 |