-
Notifications
You must be signed in to change notification settings - Fork 197
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
Rewrite overflow and overflowWrap using phantom types approach #400
Rewrite overflow and overflowWrap using phantom types approach #400
Conversation
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.
One small change, then this looks good to go!
src/Css.elm
Outdated
overflow auto | ||
|
||
-} | ||
overflow : Overflow -> Style |
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.
I'd actually prefer to inline the types rather than using type aliases for functions like these. (In fact, I wouldn't even define the type alias Overflow
!)
The reason for this is that this way, if you give overflow
a value it doesn't accept, the compiler error message will list all the values that are permitted. (e.g. visible
, hidden
, etc.)
Sorry this wasn't clear!
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.
I'm pretty sure that was clear when I read it, but just wasn't present in my mind when I was writing the code :-)
Thanks for the review! Should be fixed now.
Value "hidden" | ||
|
||
|
||
{-| The `visible` value used for properties such as [`visibility`](https://css-tricks.com/almanac/properties/v/visibility/), [`overflow`](https://css-tricks.com/almanac/properties/o/overflow/) and [`pointer-events`](https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events). |
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.
Love the detail on these docs! 😻
Awesome, thanks @juanedi! |
Restored properties:
overflow
overflowX
overflowY
overflowWrap