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 1 commit
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
21 changes: 18 additions & 3 deletions docs/docs/tailwind-css.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,27 @@ 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 all plugins arn't supported at the time of writting. Feel free to either use `twin.macro` or revert to Tailwind 0.7.4.
laurieontech marked this conversation as resolved.
Show resolved Hide resolved

**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
jeremyswann marked this conversation as resolved.
Show resolved Hide resolved
// gatsby-browser.js
jeremyswann marked this conversation as resolved.
Show resolved Hide resolved
import 'tailwindcss/dist/base.css'
```

3. Enable the Gatsby emotion plugin
```javascript
jeremyswann marked this conversation as resolved.
Show resolved Hide resolved
// gatsby-config.js
jeremyswann marked this conversation as resolved.
Show resolved Hide resolved
module.exports = {
plugins: [`gatsby-plugin-emotion`]
}
```

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