Skip to content
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: border-image-outset and border-image-width #436

Merged

Conversation

Arkham
Copy link

@Arkham Arkham commented Jun 10, 2018

This adds borderImageOutset, borderImageOutset2, borderImageOutset3, borderImageOutset4, borderImageWidth, borderImageWidth2, borderImageWidth3 and borderImageWidth4 for #392.

It also changes the type of pure numeric value that can be passed to zIndex from num to int.

Contribution Checklist

  • Each Value is an open record with a single field. The field's name is the value's name, and its type is Supported. For example foo : Value { provides | foo : Supported }
  • Each function returning Style accepts a closed record of Supported fields.
  • If a function returning Style takes a single Value, that Value should always support inherit, initial, and unset because all CSS properties support those three values! For example, borderFoo : Value { foo : Supported, bar : Supported, inherit : Supported, initial : Supported, unset : Supported } -> Style
  • If a function returning Style takes more than one Value, however, then none of its arguments should support inherit, initial, or unset, because these can never be used in conjunction with other values! For example, border-radius: 5px 5px; is valid CSS, border-radius: inherit; is valid CSS, but border-radius: 5px inherit; is invalid CSS. To reflect this, borderRadius : Value { ... } -> Style must have inherit : Supported in its record, but borderRadius2 : Value { ... } -> Value { ... } -> Style must not have inherit : Supported in either argument's record. If a user wants to get border-radius: inherit, they must call borderRadius, not borderRadius2!
  • Every exposed value has documentation which includes at least 1 code sample.
  • Documentation links to to a CSS Tricks article if available, and MDN if not.
  • Make a pull request against the phantom-types branch, not master!

@Arkham Arkham force-pushed the phantom-types--border-image-outset branch from 667b809 to 9bc3891 Compare June 11, 2018 00:22
@Arkham Arkham changed the title Phantom types: border-image-outset Phantom types: border-image-outset and border-image-width Jun 11, 2018
@Arkham Arkham force-pushed the phantom-types--border-image-outset branch from 9bc3891 to 87dd276 Compare June 11, 2018 01:04
@Arkham
Copy link
Author

Arkham commented Jun 11, 2018

Not sure why CI is failing, locally elm-validate doesn't produce any warning.

Copy link
Owner

@rtfeldman rtfeldman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely, thanks @Arkham! I'll figure out the build issue.

zIndex auto

**NOTE:** Z-index is not as simple as it looks! Make sure to read about [stacking contexts](https://css-tricks.com/css-stacking-contexts/) if you're not already familiar with them.

-}
zIndex :
Value
{ num : Supported
{ int : Supported
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

@rtfeldman rtfeldman merged commit 9373f66 into rtfeldman:phantom-types Jun 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants