Fix function colors bug#2919
Merged
adamwathan merged 1 commit intotailwindlabs:masterfrom Feb 7, 2021
Merged
Conversation
|
Any chance this will be merged soon? The |
Member
|
Thanks sorry for the delay! |
This was referenced Mar 15, 2021
Closed
Closed
Closed
Update tailwindcss requirement from ^2.0.3 to ^2.0.4
stephenlaichaowen/vite-vue3-tailwind-starter#17
Closed
This was referenced Mar 18, 2021
Closed
adamwathan
pushed a commit
that referenced
this pull request
May 7, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the problem:
I am trying to use CSS variables for colors while keeping opacity functionality.
I believe the following config should work:
This is based on https://github.com/adamwathan/tailwind-css-variable-text-opacity-demo.
This currently results in an error:
'colors.gray.400' was found but does not resolve to a string.Reproduction: https://play.tailwindcss.com/NRyd8n8K9g?file=config
This error occurs when trying to replace
color: theme('colors.gray.400', #a1a1aa);inpreflight.css.The error is thrown inside
validatePathbecausevalueis afunction.Link to a minimal reproduction:
https://play.tailwindcss.com/NRyd8n8K9g?file=config
Working Example
I've used
patch-packageto show how this should work:https://github.com/DylanVann/tailwind-css-variable-colors-demo
https://tailwind-css-variable-colors-demo.netlify.app/