-
Notifications
You must be signed in to change notification settings - Fork 60
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
feat: Fallback values #52
feat: Fallback values #52
Conversation
export type BorderStyleInput = ValueOrArray<CSS.Property.BorderStyle>; | ||
export type BorderColorInput = ValueOrArray<CSS.Property.BorderColor>; | ||
|
||
export type BorderRadiusInput = ValueOrArray<CSS.Property.BorderRadius<GriffelStylesCSSValue>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
radius
shorthand used just GriffelStylesCSSValue
not allowing initial
and similar values. Not sure there was any reason for that, I think this type is more correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same applies to margin
and padding
|
||
const useClasses = makeStyles({ | ||
root: { | ||
overflowY: ['scroll', 'overlay'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ironically, csstype typings currently do not accept overlay
as a valid value for overflow
😢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, frenic/csstype#62
Add support for fallback values.
Fixes #27.
Any CSS property accepts an array of values which are all added to the styles.
Every browser will use the latest valid value (which might be a different one in different browsers, based on supported CSS in that browser):
Produces following CSS: