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

improve typing of CSS styles using csstype package #216

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

jelhan
Copy link
Owner

@jelhan jelhan commented Jan 11, 2024

Improves the typing for CSS styles using the csstype package.

In case you are running into an issue that a valid CSS style is not allowed by the types, please update the indirect csstype dependency to a latest version. E.g. you could do so by regenerating the lockfile. If that does not help, the csstype package provides documentation how to deal with that situations: https://www.npmjs.com/package/csstype#what-should-i-do-when-i-get-type-errors

Thanks a lot to @boris-petrov for suggesting this via Discord.

@jelhan jelhan added the enhancement New feature or request label Jan 11, 2024
@jelhan jelhan merged commit 36fa214 into master Jan 11, 2024
11 checks passed
@jelhan jelhan deleted the improve-typing-for-css-styles branch January 11, 2024 20:53
@boris-petrov
Copy link
Contributor

@jelhan thanks a lot for doing that! It's certainly more helpful. How about also adding the ability to use CSS variables - what I mentioned in Discord:

Partial<CSS.Properties> | Partial<CSS.PropertiesHyphen> | { readonly [key: `--${string}`]: string }

@jelhan
Copy link
Owner Author

jelhan commented Jan 12, 2024

@jelhan thanks a lot for doing that! It's certainly more helpful. How about also adding the ability to use CSS variables - what I mentioned in Discord:

Partial<CSS.Properties> | Partial<CSS.PropertiesHyphen> | { readonly [key: `--${string}`]: string }

Missed that this is needed in addition.to support CSS custom properties. And it seems we are missing test coverage for that use case as well. A PR fixing it is highly welcome.

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

Successfully merging this pull request may close these issues.

None yet

2 participants