-
Notifications
You must be signed in to change notification settings - Fork 241
Limit the maximum-width on the entire page #405
Comments
I'm a bit split about this. On one hand I want to wrap stuff as you say but on another I don't know if we should be enforcing such limits: if users like to browse with large width then maybe we shouldn't deny them that… I see many pages which do such wrapping and often we end up with 30% of the screen taken by text and empty spots on the side, resulting in a long page instead… So I don't know what to do here. By the way your PRs are very much appreciated. All the HTML-y/web-y issues are pretty much in ‘help wanted’ state from someone who knows at least a bit what they are doing in the area (not me!). |
I would consider this to be fairly established practice. You can find many examples of such: GitHub, Google, StackOverflow, Rust docs. With a little bit of JavaScript one can also allow the user to reconfigure the width of the columns, which could be stored in a cookie so it persists.
The empty spots could be (in the future) replaced with other things like the Synopsis, or Table of Contents, or links to other modules, etc. |
In the end it goes down to personal opinions but I also agree on the necessity of a wrapper or max-width of some kind. |
this will get resolved with #721 |
This was fixed in #949 (with the new purple "Linuwial" theme). |
Most people nowadays have screens that are ≥ 1920 pixels in width, which leads to very wide Haddock pages like this:
This reduces the readability of the description, as you have to move your eyes all the way to the right of the page and back. Typographers generally recommend that the number of characters on a line should not exceed ~80 or so. It's not a hard and fast rule though.
Therefore, I propose the width of the page should be limited for screens that are sufficiently large.
Implementation should be straightforward:
<div>
s, one placed just inside the header and one to wrap everything else.margin: 0 auto; max-width: 80em;
on the inner<div>
s. (The80em
is just as an example; some other number could be used depending on taste.)The result is that the width of the page is fixed at ~80em for screens that are ≳ 80em wide while for smaller screens there is no effective change.
The text was updated successfully, but these errors were encountered: