-
Notifications
You must be signed in to change notification settings - Fork 25
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
TypeError: Cannot read property 'transparent' of undefined #26
Comments
I'll second this. I'm trying to use import tw from 'tailwind.macro'
import styled from 'styled-components/macro'
const Div = styled.div`
${tw`text-blue`}
` It throws an error:
|
Are you using the Tailwind v1 config format by any chance? |
@bradlc I did generate a full config provided by Tailwind and it worked. Sorry, I forgot to update the issue. # Instead of this
$ npx tailwind init src/tailwind.js
# Do this
$ npx tailwind init src/tailwind.js --full |
I, too, am experiencing an issue like this. I've created a minimal webpack 4 setup to reproduce the problem. For what it's worth, I haven't been able to get this lib to work in any scenario that I've tried so far (Create React App, Next.JS, and this minimal webpack setup). |
@Mike360 your config is in the Tailwind v1 format. |
Works now! Thank you @bradlc |
hey @bradlc I'm having the same issue (first time setting this up so I may be screwing up something), but I'm using a version of Tailwind that is before 1.0 (.0.7.4). When I use my custom tailwind.js file, or even a default one, values like I'm on gatsby v2 and also have the "gatsby-plugin-styled-components" and "babel-plugin-styled-components. Any pointers? Much appreciated. It seems like some tailwind classes work fine, while And just as a clarifying point, I can change my color class values on the tailwind config and this macro should still work, right? |
Hi,
I'm using Gatsby and if I use "bg-", it throws the following error:
If I don't use bg everything works fine. And it's not just for a specific type of component, it happens as soon as I use "bg-" with any color.
The text was updated successfully, but these errors were encountered: