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

Fix resolution of alpha values inside color functions #9008

merged 2 commits into from Aug 2, 2022


Copy link

The default config in Tailwind CSS makes theme.colors a function that gets resolved. This coupled with a single-level custom color function or alpha value didn't work (e.g. theme('colors.primary / 50%')) whereas colors with 2+ levels worked fine. This was caused by an off-by-1 error when determining whether or not things needed to be resolved as a function.

There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors.

Fixes #8991

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

Successfully merging this pull request may close these issues.

Custom color opacity in theme function
1 participant