Why doesn't HN use responsive units?
HN works great on mobile, but on desktop it doesn't. Every time I open HN on my computer, I either have to make the window smaller to make the text readable or zoom.
The problem is that if I zoom, the line-width gets out of hand and it gets hard to read the comment threads.
If HN used a responsive unit instead of pt for font sizes, the site would become much more readable.
There isn't much difference in readability between 1 em and 10 pt in mobile, but there is a huge difference in desktop browsing.
To test out my ideas I've hacked together a 10 line custom css to demonstrate the concept.
@-moz-document domain(news.ycombinator.com) {
.comment {
font-size: 1.2em;
line-height: 2em; /* optional */
}
.title {
font-size: 1em;
padding: 0.25em 0.1em;
}
.subtext {
font-size: 0.8em;
}
}
I've also created a stylish theme on this CSS, if you want to test it or look at screenshots, you can look at: https://userstyles.org/styles/160671/minimal-hn-readable .I think we need to tweak the HN stylesheet for desktop users. With high-dpi screens becoming more and more present in our lives, the old pt method will cause us problems. And the solution is so simple: we can just switch to em's.
7 comments
[ 2.9 ms ] story [ 16.5 ms ] threadOne question. On desktop, do you by chance have your browser window maximized?
If so, try an experiment. Demaximize your browser window, make it full screen height, but about 1/2 (or a bit more) screen width.
Then see if the line length goes out of hand.
If your browser is not maximized, well then this experiment will be of no benefit.
This works, the line-width does not get out of hand. It even switches to full screen view and removes the margins.
If I use a narrower window, there is no problem. But if I use any window bigger than 1400px, the line-width becomes an issue.
I think the problem may lie in the screen specific CSS of HN, there is no custom CSS after 1349px max width:
The interesting bit is, that if I try to load HN on responsive view in developer tools (ctrl+shift+m) and adjust the screen size to 1920x1080, the site displays without any problems, with bigger fonts and saner defaults.But if I open HN on a regular tab with the same pixel size, fonts get super small.
The problem becomes more annoying, if you use a tiling window manager such as i3. Then you have to open another frame and adjust the size of the window.
Even on regular window managers, it is annoying to have to make the browser window smaller to browse HN.
~ Khayri R.R. Woulfe
HN looks super sharp and usable on mobile, why not achieve some usability on desktop as well. All that is required is a simple media query for browser windows larger than 1400px in width or using responsive units.
What is your screen resolution? Do you use text scaling?
Do you open your browser in maximized view or do you prefer smaller windows?