serenity icon indicating copy to clipboard operation
serenity copied to clipboard

LibMarkdown: Add a grey background in code blocks

Open demostanis opened this issue 3 years ago • 1 comments

image

demostanis avatar Jul 28 '22 12:07 demostanis

Some people don't like the grey background, so that might be removed from this PR. The synopsis shouldn't be indented, but that might require some more work.

demostanis avatar Jul 28 '22 17:07 demostanis

There are probably better ways to do it, but there's now a special case for Headings where we set current_section when we see one, which we pass to CodeBlocks. This way we can check if the current section is not SYNOPSIS, and if so we add some indentation, making examples look good. Also fixed a bug with less(1) where it wouldn't colorize the section name if it was at the very top.

demostanis avatar Jul 31 '22 20:07 demostanis

It now looks like: image

demostanis avatar Jul 31 '22 20:07 demostanis

Some people don't like the grey background, so that might be removed from this PR.

Could we do something more subtle, like make the font bold in these blocks? The white on gray is a bit isn't great for readability/accessibility.

bgianfo avatar Aug 01 '22 04:08 bgianfo

Some people don't like the grey background, so that might be removed from this PR.

Could we do something more subtle, like make the font bold in these blocks? The white on gray is a bit isn't great for readability/accessibility.

That's how it looks like with bold: image

demostanis avatar Aug 01 '22 10:08 demostanis

Some people don't like the grey background, so that might be removed from this PR.

Could we do something more subtle, like make the font bold in these blocks? The white on gray is a bit isn't great for readability/accessibility.

That's how it looks like with bold: image

I was suggesting dropping the gray background and instead only using bold for these areas.

bgianfo avatar Aug 02 '22 03:08 bgianfo

Some people don't like the grey background, so that might be removed from this PR.

Could we do something more subtle, like make the font bold in these blocks? The white on gray is a bit isn't great for readability/accessibility.

That's how it looks like with bold: image

I was suggesting dropping the gray background and instead only using bold for these areas.

That's already doable with **sh**

demostanis avatar Aug 02 '22 09:08 demostanis