Skip to content

Commit

Permalink
Mention missing css absolute @import uri support in docs (vercel#2571)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Kirszenberg <[email protected]>
Co-authored-by: Maia Teegarden <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Nov 4, 2022
1 parent 3694f44 commit 08ce00d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/pages/pack/docs/features/css.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Callout from '../../../../components/Callout';

# CSS

CSS bundling is handled by SWC, using a Rust crate called `swc_css`. We haven't yet documented `swc_css` separately, but it's integrated into Turbopack and supports several CSS features:
Expand Down Expand Up @@ -50,6 +52,12 @@ Using the CSS `@import` syntax to import other CSS files works **out-of-the-box*
@import './dark.css';
```

<Callout type="info">
Turbopack does not currently support absolute URI imports in css, such as `@import "https://example.com/stylesheet.css"`. As a workaround, add
`<link rel="stylesheet" href="https://example.com/stylesheet.css" />` to your HTML document. Next.js users using `pages/` should
[add this to `pages/_document.js`](https://nextjs.org/docs/messages/no-page-custom-font#possible-ways-to-fix-it).
</Callout>

## PostCSS

PostCSS gives you the ability to use plugins to enhance your CSS toolchain. It's been an invaluable tool for integrating libraries like Tailwind and `autoprefixer` into applications.
Expand Down

0 comments on commit 08ce00d

Please sign in to comment.