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

Webkit vendor prefixes produce Typescript errors #1145

Closed
kevinwcyu opened this issue Aug 20, 2020 · 3 comments
Closed

Webkit vendor prefixes produce Typescript errors #1145

kevinwcyu opened this issue Aug 20, 2020 · 3 comments

Comments

@kevinwcyu
Copy link

kevinwcyu commented Aug 20, 2020

Describe the bug
Using WebkitBoxOrient and WebkitLineClamp properties in the sx prop produces Typescript errors.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://codesandbox.io/s/repro-theme-ui-webkit-properties-3crbb?file=/src/App.tsx
  2. See error errors produced in the sx prop of the Box component in lines 8–11.
(property) WebkitBoxOrient: string
Type 'string' is not assignable to type 'ThemeUIStyleObject'.ts(2322)
(property) WebkitLineClamp?: number | ThemeUICSSProperties | CSSPseudoSelectorProps | CSSSelectorObject | VariantProperty | ... 9 more ... | undefined
...
Type 'number' is not assignable to type 'ThemeUIStyleObject'.ts(2322)

Expected behavior
The Webkit vendor prefixes should not produce Typescript errors. See this comment for reference #234 (comment).

Additional context
The line clamping still works as expected, it's only the Typescript error that is not expected. See the output of the provided codesandbox. Removing the WebkitBoxOrient and WebkitLineClamp gets rid of the Typescript errors.

The provided codesandbox uses 0.4.0-rc.1 of theme-ui but it is also present in 0.3.1.

@hasparus
Copy link
Member

hasparus commented Sep 6, 2020

Hey @kevinwcyu! Thanks for the issue.
We've fixed it in @next 0.4.0-rc.5 version.

image
image

@kevinwcyu
Copy link
Author

Hi @hasparus, thanks! Just tried it out and it works.

@hasparus
Copy link
Member

hasparus commented Sep 9, 2020

Glad to hear that!

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

No branches or pull requests

2 participants