You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CSSProperties type does not support strict typing. It allows any property name to be used for a style. This prevents type checking and intellisense for Stylesheet.create.
It appears this is due to CSSPropertiesLossy in the type.
I find this is very annoying as well, in addition the browser simply ignores any invalid property, so that manual errors are not detected.
However, I think its intended to be like this, since not all CSS properties are declared in CSSProperties type (eg userSelect), and in order to support custom selector handlers.
I had the same issue with emotion, and I believe it has to do with the pseudo or attribute selectors. emotion-js/emotion#1888
Ideally we would need to have those declared under a nest property so it can be correctly typed.
CSSProperties
type does not support strict typing. It allows any property name to be used for a style. This prevents type checking and intellisense forStylesheet.create
.It appears this is due to
CSSPropertiesLossy
in the type.Example:
https://codesandbox.io/s/aphrodite-no-type-checking-itwip?file=/src/index.ts
The text was updated successfully, but these errors were encountered: