Skip to content

Code block formatting on the front page and in comments #211

@kbauer

Description

@kbauer

Originally posted in https://what.thedailywtf.com/topic/29205/website-feedback-code-block-formatting-issues, until I got a reply mentioning this repository.

In the comment section of articles, code block formatting is a bit odd, affecting both desktop Chrome and Android Chrome. Same on the frontpage too:

  • Scrollbars. It has an unnecessary greyed-out scrollbar, when none is needed. Especially for one-liners, this adds a lot of visual noise.

  • Spacing. There is whitespace above but not below the code block. The space below the code block, that I would expect to be empty, is currently occupied by the unnecessary scrollbar.

  • A minor thing, but: It does not follow common conventions to make it easier to distinguish code blocks from prose:

    • The articles on thedailywtf.com, Github, Reddit, this forum all use distinguished background coloring. Often combined with some padding.
    • In plain markdown, the four-space indentation does a good job o separating text from code visually, even without extra highlighting.
    • By contrast, comment pages and the front page have only monospaced font and a small padding.

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions