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

CSS Typed OM support #170

Open
MrFoxPro opened this issue Nov 15, 2022 · 1 comment
Open

CSS Typed OM support #170

MrFoxPro opened this issue Nov 15, 2022 · 1 comment

Comments

@MrFoxPro
Copy link

MrFoxPro commented Nov 15, 2022

https://developer.chrome.com/blog/cssom/

https://ishoudinireadyyet.com/

https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/w3c-css-typed-object-model-level-1

style={{
   width: CSS.percent(100),
   height: CSS.percent(100),
}} // <- this is valid in Chromium

/* Type 'CSSUnitValue' is not assignable to type 'Width<0 | (string & {})>'.
  Type 'CSSUnitValue' is not assignable to type 'string & {}'.
    Type 'CSSUnitValue' is not assignable to type 'string'. */
@MrFoxPro
Copy link
Author

MrFoxPro commented Nov 15, 2022

As I understand it's possible right now with Generics:

csstype.PropertiesHyphen<CSSUnitValue | 0 | (string & {})>

Is it correct?

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

1 participant