Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tailwind.macro has depreciated #22065

Merged
merged 7 commits into from
Mar 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions docs/docs/tailwind-css.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,28 @@ These steps assume you have a CSS-in-JS library already installed, and the examp

1. Install Tailwind Babel Macro

**Note**: `tailwind.macro` isn't currently compatible with Tailwind 1.0.0+. However, a compatible beta is available at `tailwind.macro@next`. Feel free to either use the beta or revert to Tailwind 0.7.4.
**Note**: `tailwind.macro` isn't currently compatible with Tailwind 1.0.0+. However, a new forked project can be found at `twin.macro` that supports Tailwindcss v1.2 classes. It's currently in pre-release so not all plugins are supported at the time of writing. Alternatively, you can revert to Tailwind 0.7.4.

**Option 1**: Install `tailwind.macro@next` and use Tailwind 1.0.0+
**Option 1**: Install `twin.macro` and use Tailwind 1.2.0+

1. Install Twin and Emotion

```shell
npm install --save tailwind.macro@next
npm install -D twin.macro @emotion/core @emotion/styled gatsby-plugin-emotion
```

2. Import the Tailwind base styles

```javascript:title=gatsby-browser.js
import "tailwindcss/dist/base.css"
```

3. Enable the Gatsby emotion plugin

```javascript:title=gatsby-config.js
module.exports = {
plugins: [`gatsby-plugin-emotion`],
}
```

**Option 2**: Install stable `tailwind.macro` and use Tailwind 0.7.4
Expand Down