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
merged 6 commits into from Jul 7, 2022

Conversation

thecrypticace
Copy link
Collaborator

@thecrypticace thecrypticace commented Jul 5, 2022

Fixes #8728

@thecrypticace thecrypticace requested a review from RobinMalfait Jul 5, 2022
@thecrypticace thecrypticace marked this pull request as draft Jul 5, 2022
@RobinMalfait
Copy link
Contributor

RobinMalfait commented Jul 6, 2022

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
Contributor

@RobinMalfait RobinMalfait left a comment

Looks good to me.

@thecrypticace thecrypticace marked this pull request as ready for review Jul 7, 2022
@thecrypticace thecrypticace merged commit 62f0791 into master Jul 7, 2022
11 checks passed
@thecrypticace thecrypticace deleted the fix/default-theme-types branch Jul 7, 2022
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 this pull request may close these issues.

2 participants