csstype icon indicating copy to clipboard operation
csstype copied to clipboard

type def might be missing 'overlay' for OverflowXProperty

Open nick-gaudreau opened this issue 6 years ago • 4 comments

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";

nick-gaudreau avatar Jan 01 '19 01:01 nick-gaudreau

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.

frenic avatar Jan 03 '19 07:01 frenic

Nice thx - I didn't think of casting it

nick-gaudreau avatar Jan 04 '19 04:01 nick-gaudreau

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?

EvanHahn-Signal avatar Oct 06 '21 22:10 EvanHahn-Signal

What is the status on this issue?

erictuvesson avatar Mar 07 '23 13:03 erictuvesson