Live data from Hacker News

58 bytes of CSS to look great nearly everywhere

gist.github.com

141–150 of 254 posts

Re: 58 bytes of CSS to look great nearly everywhere

#141
post #93

> it appears that the default font size for most browsers is 16px, so 38rem is 608px. supporting 600px displays at a minimum seems reasonable. I dont get the logic here. If the goal is 600px, why are we using rem?

If the units don't match, changing the user's base font size will only affect one of them. Part of why we stopped using rem.

Why are we even setting a font-size on root of we want to base the width on the "default?"

Why are we even setting a max-width? Just split text into columns to maintain a legible line length.

Re: 58 bytes of CSS to look great nearly everywhere

#142
post #126

Earlier quoted context omitted.

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.

Then they'll have to resize it every time they visit a website where a wide window is actually beneficial.

Re: 58 bytes of CSS to look great nearly everywhere

#143

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…

Because reading paragraphs of text with extremely long lines is really annoying. If the lines get too long it makes it hard to subconsciously find the next line when you scan back.

What's your solution? The only other option I can think of is multi-column newspaper style, but that's pretty fundamentally incompatible with the scrolling model of the web.

That's probably why you only see multi-column formats in page-based media like physical newspapers and PDF papers.

Re: 58 bytes of CSS to look great nearly everywhere

#144

Earlier quoted context omitted.

They override the CSS attributes that don't fit what they are doing now, but changing the defaults would introduce new attributes, which may not presently be overridden.

The modern approach is to do a universal rest: *, *:before, *:after { all: unset; display: revert; box-sizing: border-box; }

Would that actually work as a safeguard against this? What you're reverting and unsetting to is the very defaults we're talking about changing.

Re: 58 bytes of CSS to look great nearly everywhere

#146
post #9

Earlier quoted context omitted.

Default styling looks terrible and is hard to read. Humans are good at reading columns at around roughly 80 characters, while browsers default to filling the whole width of the screen with text, resulting in a column that's hundreds of characters wide. Text also gets easier to read when more spaced out; the default line height makes the text too close together. Browsers still ship the bad defaults because changing de…

I much prefer the default styling other than that the margins are nearly nonexistent. Any time I come across a site that uses mostly default styling (such as some academic webpages from the 90s), I always think to myself "wow, this is pleasant to read." > Text also gets easier to read when more spaced out; the default line height makes the text too close together. The opposite is easily true in my experience. Making…

I feel that large text with large line heights makes small pieces of text (maybe a couple paragraphs maximum) easier to read, but makes comprehension of a larger piece of text more difficult. It makes you loose overview of the larger structure.

It's very well possible that it's all different for different people, but I much prefer having a larger piece of text in view; smaller font, smaller margins and smaller line height all help with that. Longer lines of text too. All within reason, of course.

You know how books for children have ridiculously large fonts and spacing, in stark contrast with (most) books for grown ups? It seems there is a trend now to make websites look like the books I had when I was just a little kid. I don't like it.

Re: 58 bytes of CSS to look great nearly everywhere

#147
post #18

Earlier quoted context omitted.

> Humans are good at reading columns at around roughly 80 characters What makes you say that? Anecdotally, I prefer using the full width of my screen.

Newspapers have been using columns to break up long lines for well over a century. It's hard to find to the next line, if they are too long.

And it's annoying to have to find the next line every few words if the lines are too short.

Newspaper columns have always felt way too short for me. Most books have longer lines, and I much prefer that.

Re: 58 bytes of CSS to look great nearly everywhere

#149

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…

Even worse when the text has things like code examples that aren't completely readable without horizontal scrolling.

Re: 58 bytes of CSS to look great nearly everywhere

#150
post #45

A comparison using danluu's website: Default: https://postimg.cc/k2Zwffms With the 100 bytes version: https://postimg.cc/645d9vKT

I honestly prefer the default version. Less scrolling to do.

But more horizontal eye movement, which at least I find unpleasant
Post reply on HN