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

3.1 version, theme function reports lint error #8619

Closed
Rayzhangzhang opened this issue Jun 13, 2022 · 1 comment · Fixed by #8625
Closed

3.1 version, theme function reports lint error #8619

Rayzhangzhang opened this issue Jun 13, 2022 · 1 comment · Fixed by #8625
Assignees

Comments

@Rayzhangzhang
Copy link

Rayzhangzhang commented Jun 13, 2022

What version of Tailwind CSS are you using?

v3.1.2

What build tool (or framework if it abstracts the build tool) are you using?

What version of Node.js are you using?

16.14

What browser are you using?

What operating system are you using?

Reproduction URL

Describe your issue

theme('colors[primary] / 20%') reports 'colors[primary] / 20%' does not exist in your theme config..

It works well , but reports a lint error. Do I need to add any config or change the code below in tailwind.config.js ?

...
primary: withOpacity('--color-primary-rgb'),
...

Describe the problem you're seeing, any important steps to reproduce and what behavior you expect instead.

@thecrypticace
Copy link
Contributor

Hey, thanks for reporting this. This should definitely work but we didn't test the quoted syntax with alpha values at all — we don't generally recommend it anymore just for consistency with CSS itself. I've merged the fix in and it'll be in our insiders build fairly shortly which you can test with npm install tailwindcss@insiders if you want to give it a try before we tag a new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants