package.elm-lang.org icon indicating copy to clipboard operation
package.elm-lang.org copied to clipboard

Ensure consistent colors in signatures/code shown?

Open jvoigtlaender opened this issue 10 years ago • 3 comments
trafficstars

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: screenshot It's a bit odd that:

  • the : and -> are green in the signature of keepIf but not in the signatures of numbers, isEven, evens, and
  • the type Bool is black in the signature of keepIf but brown in the signature of isEven, as well as that
  • the type Stream is blue (as a link) in the signature of keepIf but 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.

jvoigtlaender avatar Oct 01 '15 06:10 jvoigtlaender

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.

evancz avatar Oct 01 '15 09:10 evancz

Discussion of this topic on the mailing list: https://groups.google.com/d/msg/elm-discuss/Xsv8Dmo-_Jw/NyVvJy3VDwAJ

jvoigtlaender avatar Oct 02 '15 05:10 jvoigtlaender

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.

rlefevre avatar Dec 07 '19 19:12 rlefevre