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

Add more explicit types for the default theme #8780

merged 6 commits into from Jul 7, 2022


Copy link

Fixes #8728

@thecrypticace thecrypticace marked this pull request as draft July 5, 2022 18:04
Copy link

I wonder if we could generate types on the fly when we are in watch mode so that we also catch types from the user config (and deeply nested resolved configs) that would be kind of cool.

I got worried for a second that the types weren't using all the shapes they could use (e.g. fontSize allows multiple forms) and we only used a single record. But then I realized that this is "just" for the tailwindcss/defaultTheme import itself which I think is good right now.

For the functions we could try to resolve the default config first so that the functions are gone, but then the issue is that it can look like you can just do defaultTheme.backdropBlur.lg but that's not the case because of that function so right now I think this makes sense.

Copy link

@RobinMalfait RobinMalfait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@thecrypticace thecrypticace marked this pull request as ready for review July 7, 2022 13:05
@thecrypticace thecrypticace merged commit 62f0791 into master Jul 7, 2022
@thecrypticace thecrypticace deleted the fix/default-theme-types branch July 7, 2022 13:05
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.

Type definitions for defaultTheme is incorrectly too generic
2 participants