From 4c4c797020ffb79cfa00e2dfa801fba06a1b83e6 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Fri, 27 Aug 2021 06:40:40 -0700 Subject: [PATCH] Update Tailwind docs for path to css (#1240) * Update Tailwind docs for path to css * Remove other references to public in the styling guide * Remove unnecessary (pages) --- docs/src/pages/guides/styling.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/src/pages/guides/styling.md b/docs/src/pages/guides/styling.md index bdeb3a22f..26892a646 100644 --- a/docs/src/pages/guides/styling.md +++ b/docs/src/pages/guides/styling.md @@ -114,10 +114,12 @@ Astro also supports [Sass][sass] out-of-the-box. To enable for each framework: ๐Ÿ’โ€ Sass is great! If you haven't used Sass in a while, please give it another try. The new and improved [Sass Modules][sass-use] are a great fit with modern web development, and it's blazing-fast since being rewritten in Dart. And the best part? **You know it already!** Use `.scss` to write familiar CSS syntax you're used to, and only sprinkle in Sass features if/when you need them.' -**Note**: If you use .scss files rather than .css files, your stylesheet links should still point to .css files because of Astroโ€™s auto-compilation process. When Astro โ€œneedsโ€ the styling files, itโ€™ll be โ€œlooking forโ€ the final .css file(s) that it compiles from the .scss file(s). For example, if you have a .scss file at `./public/style/global.scss`, use this link: `` โ€” **not** ``. +**Note**: If you use .scss files rather than .css files, your stylesheet links should still point to .css files because of Astroโ€™s auto-compilation process. When Astro โ€œneedsโ€ the styling files, itโ€™ll be โ€œlooking forโ€ the final .css file(s) that it compiles from the .scss file(s). For example, if you have a .scss file at `./src/styles/global.scss`, use this link: `` โ€” **not** ``. ### ๐Ÿƒ Tailwind +> Note that Astro's Tailwind support *only* works with Tailwind JIT mode. + Astro can be configured to use [Tailwind][tailwind] easily! Install the dependencies: ``` @@ -146,16 +148,16 @@ Be sure to add the config path to `astro.config.mjs`, so that Astro enables JIT }; ``` -Now you're ready to write Tailwind! Our recommended approach is to create a `public/global.css` file (or whatever youโ€˜d like to name your global stylesheet) with [Tailwind utilities][tailwind-utilities] like so: +Now you're ready to write Tailwind! Our recommended approach is to create a `src/styles/global.css` file (or whatever youโ€˜d like to name your global stylesheet) with [Tailwind utilities][tailwind-utilities] like so: ```css -/* public/global.css */ +/* src/styles/global.css */ @tailwind base; @tailwind components; @tailwind utilities; ``` -As an alternative to `public/global.css`, You may also add Tailwind utilities to individual `pages/*.astro` components in `