Live data from Hacker News

58 bytes of CSS to look great nearly everywhere

gist.github.com

121–130 of 254 posts

Re: 58 bytes of CSS to look great nearly everywhere

#121

I think this does not work well for mobile devices. Spacing and the font size is too large. Hence, a lot of screen space is wasted and the user has to scroll more. Larger font sizes on mobile are usually not a good idea as the device tends to be closer to your eyes anyway. A snippet that could work better in my opinion is the following: html { max-width: 70ch; /* larger spacing on larger screens, very small spacing o…

I wonder if everyone has a different optimum here based on different eyesight, screen size, and usage patterns. I always have a slightly different zoom on every website I visit. With this one I tend to agree, I can't see enough text at once and the margins seem a bit wide.

Yeah, the zoom, that almost needs to be customized per website, sigh. But one of the worst misfeatures for old (and maybe not so old) eyes, is the gray text on some "pastel" background. Contrast helps readability (as does a carefully chosen font), but "modern" designers seem to think contrast is bad or outdated or whatever.

Re: 58 bytes of CSS to look great nearly everywhere

#123

Earlier quoted context omitted.

yep. I hate it. I've seen people say this is a result of studies but I've never been able to find the studies that claim this is better. It seems to have been stated in elements of typographic style and taken as truth http://webtypography.net/2.1.2

Well you must have not searched very hard if you didn't find studies, because it took me a grand total of 3 minutes: https://www.semanticscholar.org/paper/Optimal-Line-Length-in... There are many citations that lead to other studies on the same topic.

Thanks.

Re: 58 bytes of CSS to look great nearly everywhere

#126

People who use that accursed max-width style are the bane of my existence. Let it fill the entire browser! I have no idea how this became a trend.

People are using 48+ inch OLED tvs for monitors now. Someone reading full width text will look like they're watching a tennis match.

Re: 58 bytes of CSS to look great nearly everywhere

#127

It seems like I'm permanently in some sort of dystopian nightmare 'unpopular opinion' group where wasting two thirds of my monitors useful space is the right way about doing things. I have monitors either side of my primary in portrait mode specifically for looking at a bunch of code/text and it still wastes at least half of the useful display area. https://i.imgur.com/Qk7fM35.png If I wanted this, I'd press the read…

But, you're the one wasting it, right? You have a huge monitor with one window open. I use a WM and very rarely have one window on a whole screen, because that would be a waste of screen. If that text was full width along your screen you'd be wasting vertical screen space instead. Will you ask them to write more to fill your screen up?

Well, OK sure. I'm not the most effective communicator but in the end I'm still genuinely 'not getting it' though.

In my image you can see that either portrait or landscape orientation, there is considerable 'dead' area (edit: either side), by default, even if the text was many paragraphs long.

The usual solution is to smash "ctrl numpad +" four times til things fit perfectly at (usually) 150%. It's actually uncanny how I'll do this without even thinking while browsing.

Re: 58 bytes of CSS to look great nearly everywhere

#128

Could the default style in browsers be adjusted so nearly any webpage can look great with plain HTML?

In my opinion, it does already, without needing much CSS except to limit pictures to the width of the viewable area (you can click on them and select "view picture" to zoom them, if desired). I rarely need to add my own CSS code to web pages that do not already have CSS; it is those that do, that I need to fix.

I made up a attribute feature="usercss" which is supposed to mean to use the user-specified CSS (or suitable defaults for semantic HTML) instead of this one, if the client supports that feature; it can also use the user-specified CSS (or suitable defaults) if the web page does not specify any CSS at all. As far as I know no browsers implement this, but some of the people making up some newer browsers (the less common ones) might consider to add such a feature when user-specified CSS is implemented.

Re: 58 bytes of CSS to look great nearly everywhere

#129
post #126

People who use that accursed max-width style are the bane of my existence. Let it fill the entire browser! I have no idea how this became a trend.

People are using 48+ inch OLED tvs for monitors now. Someone reading full width text will look like they're watching a tennis match.

People can set the exact width they're comfortable with by making the browser window the size they want. But the moment that max-width is added, the choice is removed.

Re: 58 bytes of CSS to look great nearly everywhere

#130

People who use that accursed max-width style are the bane of my existence. Let it fill the entire browser! I have no idea how this became a trend.

Isn't it more readable not to have really long lines?

We can have both! Wide containers with narrow line lengths.

We call them "columns" and they're part of CSS now.

Post reply on HN