frenic / csstype

Strict TypeScript and Flow types for style based on MDN data
MIT License
1.73k stars 72 forks source link

type def might be missing 'overlay' for OverflowXProperty #62

Open nick-gaudreau opened 5 years ago

nick-gaudreau commented 5 years ago

export type OverflowXProperty = Globals | "auto" | "clip" | "hidden" | "scroll" | "visible";

I think its not the only one that should have the 'overlay' property. With material UI when assigning style using JS for overflowX: "overlay" I would get a type error.

Manually did this fix my issue in csstype/index.d.ts: export type OverflowXProperty = Globals | "auto" | "clip" | "hidden" | "scroll" | "visible" | "overlay";

frenic commented 5 years ago

The overlay value is deprecated and therefore not included. What you can do to get rid of the type error is to do: { ['overflowX' as any]: 'overlay' } as described in the docs. I hope it helps.

nick-gaudreau commented 5 years ago

Nice thx - I didn't think of casting it

EvanHahn-Signal commented 2 years ago

To quote MDN:

Only supported in WebKit-based (e.g., Safari) and Blink-based (e.g., Chrome or Opera) browsers.

It doesn't look like the value is deprecated, just nonstandard. Should it be added and this issue reopened?

erictuvesson commented 1 year ago

What is the status on this issue?