-
Notifications
You must be signed in to change notification settings - Fork 198
Phantom Types: Contributing
Richard Feldman edited this page Mar 30, 2018
·
7 revisions
See #375 for background.
Previously the linking policy was to either link to MDN or not to bother writing documentation (e.g. have {-| -} for a doc comment.) The new policy is to have documentation for every value, including at least one code example, and which links to relevant documentation on that property.
I originally linked to MDN for all the docs, but I've since discovered CSS Tricks has some really well-written guides on how to use various properties and values in practice, and those articles tend to link to MDN documentation at the end anyway. So the new policy is to link to CSS Tricks if there's an appropriate article for that value, and to fall back on linking directly to MDN if CSS Tricks happens not to have anything relevant.
- Each
Valueis 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 } - Each function returning
Styleaccepts a closed record ofSupportedfields, which always includesinherit,initial, andunsetbecause all CSS properties support those three values! For example,borderFoo : Value { foo : Supported, bar : Supported, inherit : Supported, initial : Supported, unset : Supported } -> Style - 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.