-
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
Phantom types: background-size #421
Phantom types: background-size #421
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.
Just 2 quick documentation requests, and 👍 to rebasing on phantom-types
now that #419 is merged!
, vw : Supported | ||
, vmin : Supported | ||
, vmax : Supported | ||
, auto : Supported |
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.
Nice, thanks for not including inherit
et al 😄
src/Css.elm
Outdated
AppendProperty ("background-size:" ++ width ++ " " ++ height) | ||
|
||
|
||
{-| Used in [`backgroundSize`](#backgroundSize) to always show the whole |
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.
Can we get CSS Tricks (or, failing that, MDN) links for contain
and cover
?
afdf59e
to
ef8b3a2
Compare
done. Ready for another review 😄 |
Fantastic, thank you @BrianHicks! |
This adds
backgroundSize
andbackgroundSize2
for #392. Commits for this start at 48733cd, and I'm happy to rebase onto phantom-types when/if #419 is merged.I was going to add
backgroundSizes
to go along withbackgroundImages
, but I can't figure out a good way of doing the types. Essentially, we need to be able to have all these properties:Value
is an open record with a single field. The field's name is the value's name, and its type isSupported
. For examplefoo : Value { provides | foo : Supported }
Style
accepts a closed record ofSupported
fields.Style
takes a singleValue
, thatValue
should always supportinherit
,initial
, andunset
because all CSS properties support those three values!Style
takes more than oneValue
, however, then none of its arguments should supportinherit
,initial
, orunset
, because these can never be used in conjunction with other values!phantom-types
branch, notmaster
!