SwiftDocOrg / swift-doc

A documentation generator for Swift projects
https://swiftdoc.org
MIT License
1.68k stars 100 forks source link

Style callout delimiters in discussion for HTML output #282

Closed mattt closed 3 years ago

mattt commented 3 years ago

Fixes #281

This PR adopts the following color coding for annotation types, but I'm very much open to changing this around:

This doesn't handle custom callouts, but those are Xcode Playgrounds-specific, and the default rendering is good enough.


Screen Shot 2021-05-18 at 10 20 51 Screen Shot 2021-05-18 at 10 20 33 Screen Shot 2021-05-18 at 10 21 00 Screen Shot 2021-05-18 at 10 20 25
mattt commented 3 years ago

@Lukas-Stuehrk Thanks for pointing out the contrast ratios for that and suggesting more accessible alternatives. These look a lot more reasonable:

Screen Shot 2021-06-01 at 11 36 09
mattt commented 3 years ago

Still some room for improvement, possibly using text shadows to preserve contrast without compromising the color palette as much. And some work to do to make this work with dark mode (#160 I know, sorry for the delay 🙇). But I think this is good enough for now. :shipit: