Skip to content

Commit 4149c52

Browse files
jeremyswannLBgatsbybot
authoredMar 10, 2020
tailwind.macro has depreciated (#22065)
* tailwind.macro has depreciated added Twin docs for versions 1.0.0+ of Tailwind * Update docs/docs/tailwind-css.md Co-Authored-By: LB <laurie@gatsbyjs.com> * Update docs/docs/tailwind-css.md Co-Authored-By: LB <laurie@gatsbyjs.com> * Update docs/docs/tailwind-css.md Co-Authored-By: LB <laurie@gatsbyjs.com> * Update docs/docs/tailwind-css.md Co-Authored-By: LB <laurie@gatsbyjs.com> * Update docs/docs/tailwind-css.md Co-Authored-By: Jeremy Swanborough <jeremy@swanburger.com> * chore: format Co-authored-by: LB <laurie@gatsbyjs.com> Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
1 parent e1079e2 commit 4149c52

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed
 

‎docs/docs/tailwind-css.md

+19-3
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,28 @@ These steps assume you have a CSS-in-JS library already installed, and the examp
7070

7171
1. Install Tailwind Babel Macro
7272

73-
**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.
73+
**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.
7474

75-
**Option 1**: Install `tailwind.macro@next` and use Tailwind 1.0.0+
75+
**Option 1**: Install `twin.macro` and use Tailwind 1.2.0+
76+
77+
1. Install Twin and Emotion
7678

7779
```shell
78-
npm install --save tailwind.macro@next
80+
npm install -D twin.macro @emotion/core @emotion/styled gatsby-plugin-emotion
81+
```
82+
83+
2. Import the Tailwind base styles
84+
85+
```javascript:title=gatsby-browser.js
86+
import "tailwindcss/dist/base.css"
87+
```
88+
89+
3. Enable the Gatsby emotion plugin
90+
91+
```javascript:title=gatsby-config.js
92+
module.exports = {
93+
plugins: [`gatsby-plugin-emotion`],
94+
}
7995
```
8096

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

0 commit comments

Comments
 (0)
Please sign in to comment.