too narrow, wraps text
Closed this issue · 6 comments
It is easier to read documentation when it does not span the whole width of a large browser.
I'd be curious how you managed to get the screenshot provided. I'm only able to get the box small enough to wrap with a screen 760px or narrower (which is the point at which the header changes into "mobile" style).
Regarding wrapping, I can change the white-space: pre-wrap rule to white-space: pre, which will result in a horizontal scrollbar instead; I'm not sure whether this would be a better experience.
I'm trying out white-space: pre for the time being.
It is easier to read documentation when it does not span the whole width of a large browser.
This cannot be universally true. The final arbiter about what's comfortable to read is the user. Everyone knows how to make the browser window narrower. Not everyone knows how to override styles¹, so most of those who are bothered by a narrow content width will just suffer through it. Reader mode² in Firefox is too strong of a solution because it also removes all the useful colours and borders.
I am a Web programmer and it's straight-forward for me to apply a style locally:
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("perldoc.pl") {
.container, #perldocdiv { max-width: inherit; }
}
… but this bug report now exists on behalf of those less able. Maybe you haven't noticed, but p3rl.org has started redirecting to perldoc.pl, so you now have gained a large installed user-base and the corresponding responsibility to give all of them a good user experience as well as you can.
Follow the example of s.c.o and metacpan and use most of the width. If not, it is certain that users will become resentful and treat narrow content as damage and work around it, like they did with stubborn JJ and perldoc.perl.org.
¹ The last Web browser that made that easy for everyone was Opera 12, but sadly, this era is over.
² specifically exists to negate abuse of CSS width/max-width
I'd be curious how you managed to get the screenshot provided.
That's Firefox 61, taken with Spectacle, then cropped to the exact viewport.
which will result in a horizontal scrollbar instead; I'm not sure whether this would be a better experience.
You are also not the final arbiter about what's comfortable to read. I do not wish to impose people to have to remove a perldoc.pl tab from their main browser window in order to resize it, or to learn how to restyle as you have in order to get the opposite effect. I will definitely leave this issue open for additional opinions however. I do take the s.c.o and metacpan styles into consideration, but also those of many other sites which are more likely to have done user-based studies than those.
Re horizontal scrollbar - I agree it's not perfect, but this link is from 13 years ago and makes no mention of using it for code which requires an unwrapped presentation.
I added an Expand button in larger views which will toggle between the standard view and expanding the margins to the edge of the browser. The button requires javascript but the resulting state is saved as a cookie and does not. I hope this addresses your concern.