Skip to content

Commit

Permalink
chore: update tailwind import path (#1205)
Browse files Browse the repository at this point in the history
* chore: update tailwind import path

Otherwise Tailwinds purging and plugins are not working.

* Revert "chore: update tailwind import path"

This reverts commit e4ae781.

* chore: update using tailwind with postcss docs

* Update 08-guides.md

Co-authored-by: Fred K. Schott <[email protected]>
  • Loading branch information
stefanfrede and FredKSchott authored Oct 5, 2020
1 parent d4b21d3 commit 9a9c3ac
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions docs/docs/08-guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ You can add [Tailwind](https://tailwindcss.com) to any project via native CSS `@
@import 'tailwindcss/dist/utilities.css';
```

#### Using PostCSS
#### Using Tailwind with PostCSS

Tailwind also ships with first-class support for PostCSS. If you are using PostCSS in your project ([see above](#postcss)) then you can just add the Tailwind PostCSS plugin to your PostCSS config file to take advantage of the `@tailwind` keyword.
If you are using PostCSS in your project ([see above](#postcss)) then you can just add Tailwind as a plugin to your `postcss.config.js`:

```js
// postcss.config.js
Expand All @@ -123,6 +123,18 @@ module.exports = {
};
```

Once you have added the Tailwind PostCSS plugin, you can replace your native CSS `dist` imports with Tailwind's more powerful `base`, `components`, and `utilities` imports:

```diff
/* index.css */
- @import 'tailwindcss/dist/base.css';
- @import 'tailwindcss/dist/components.css';
- @import 'tailwindcss/dist/utilities.css';
+ @import 'tailwindcss/base';
+ @import 'tailwindcss/components';
+ @import 'tailwindcss/utilities';
```

Follow the official [Tailwind CSS Docs](https://tailwindcss.com/docs/installation/#using-tailwind-with-postcss) for more information.

### Sass
Expand Down

0 comments on commit 9a9c3ac

Please sign in to comment.