package.elm-lang.org
package.elm-lang.org copied to clipboard
Ensure consistent colors in signatures/code shown?
Now that we have syntax highlighting of code blocks on the package pages, the question arises whether the colors should be consistent with how type signatures are shown. For example, http://package.elm-lang.org/packages/Apanatshka/elm-signal-extra/5.6.0/Signal-Stream#keepIf currently looks like this:
It's a bit odd that:
- the
:and->are green in the signature ofkeepIfbut not in the signatures ofnumbers,isEven,evens, and - the type
Boolis black in the signature ofkeepIfbut brown in the signature ofisEven, as well as that - the type
Streamis blue (as a link) in the signature ofkeepIfbut brown in other signatures.
I guess that if one were to look at other syntactic features (type definitions, record syntax, ...?), one might find further such inconsistencies in display.
Fixing the inconsistencies could go either by changing the css used by the code block highlighter, or by changing the colors put in place by the Elm code that renders the type signatures.
I'd vote strongly for making the code match with CSS changes. Not sure how easy it is to find a good color scheme that'll match here though.
Discussion of this topic on the mailing list: https://groups.google.com/d/msg/elm-discuss/Xsv8Dmo-_Jw/NyVvJy3VDwAJ
I don't know the whole history but currently arrows seem to always be in black and types are in blue only when they are links to the actual type.
Therefore, as far as I can tell, this issue seems obsolete and could be closed.