Skip to content

Web version: Table of contents poorly wraps long appendix titles #2003

Closed

Description

@Chealer

The web page with the table of contents tries to dedicate a right column to an image of the book and download links. This leaves the main (central) column narrower, and causes some ToC entries to require wrapping on a second line. This generally occurs for 3 items in appendices. The way the first 2 appendix titles displays (in both Firefox 133.0 and Google Chrome) is arguably incorrect, as can be seen in the screenshot below:
image

The format of A1.4's title is not great but acceptable, however the title of A1 itself has so much vertical space between its 2 lines that the "Environments" line is closer to A1.1 than to the beginning of the title.

This space is caused by the line-height CSS property, which comes from this rule:

h2 {
  margin-top:20px;
  font-size:18px;
  font-weight:700;
  line-height:44px;
  color:#f14e32
}

Although the unwarranted leading should be fixed, this issue should not have been so exposed. There are several ways to avoid wrapping altogether:

  1. Shorten titles; the titles would be less redundant by making an Appendix section and put all appendices under it.
  2. Widen the ToC.
    1. On my screen, the viewport has a width of 2560 pixels. Using only 940 is quite a waste.
    2. The ToC itself typically gets no more than 394 pixels, mostly due to the left column and the floating right column for traditional versions. It would be trivial to save 36 pixels by removing the superfluous left margin. It would also be possible to waste less on the right column:
      1. Most easily by removing the superfluous 40 pixels right margin.
      2. Or by just merging it in the left column.

Activity

  1. ben commented on Dec 16, 2024

    @ben
    Member

    This sounds like a good idea, but the code that styles that page is over at https://github.com/git/git-scm.com, so you'll have to report it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions