diff options
author | 2021-09-01 01:54:35 +1000 | |
---|---|---|
committer | 2021-08-31 08:54:35 -0700 | |
commit | 5b24bd176818e285b2eea986c43b89ff8b6330fd (patch) | |
tree | 856f3cb895e941cd18ed8e9f6c7f73451a1dc7f9 /docs/src | |
parent | 327d59287f774cfae2e0f7840415d52c42797e39 (diff) | |
download | astro-5b24bd176818e285b2eea986c43b89ff8b6330fd.tar.gz astro-5b24bd176818e285b2eea986c43b89ff8b6330fd.tar.zst astro-5b24bd176818e285b2eea986c43b89ff8b6330fd.zip |
Add v20 documentation for bundling assets (#1262)
* Add v20 documentation for bundling assets
* 🛁 Revert bad doc
* 🛁 Address CR
* ✨ Use astro
* 🛁 Correct Link
* Update styling.md
Co-authored-by: Fred K. Schott <fkschott@gmail.com>
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/pages/guides/styling.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/src/pages/guides/styling.md b/docs/src/pages/guides/styling.md index d24c28fa1..1e5ff9bf0 100644 --- a/docs/src/pages/guides/styling.md +++ b/docs/src/pages/guides/styling.md @@ -159,6 +159,17 @@ Now you're ready to write Tailwind! Our recommended approach is to create a `src 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 + +As of [version 0.20.0](https://github.com/snowpackjs/astro/releases/tag/astro%400.20.0), Astro will no longer bundle, build and process `public/` files. Previously, we'd recommended putting your tailwind files in the `public/` directory. If you started a project with this pattern, you should move any Tailwind styles into the `src` directory and import them in your template using [Astro.resolve()](/reference/api-reference#astroresolve): + +```astro + <link + rel="stylesheet" + href={Astro.resolve("../assets/global.css")} + > +``` + ### Importing from npm If you want to import third-party libraries into an Astro component, you can use a `<style lang="scss">` tag to enable [Sass][sass] and use the [@use][sass-use] rule. |