Live data from Hacker News

58 bytes of CSS to look great nearly everywhere

gist.github.com

11–20 of 254 posts

Re: 58 bytes of CSS to look great nearly everywhere

#11
post #3

Quick example of how it looks: https://jsfiddle.net/n8Lqypb7/

Is there some way to view the result full screen, namely for viewing on mobile?

result: https://jsfiddle.net/n8Lqypb7/show

Original page: http://web.archive.org/web/20210318102514/https://jrl.ninja/...

Re: 58 bytes of CSS to look great nearly everywhere

#12
post #9

What is wrong with browser default styling, and why do browsers ship with something that is wrong?

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…

> 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.

Re: 58 bytes of CSS to look great nearly everywhere

#13
post #7

What is wrong with browser default styling, and why do browsers ship with something that is wrong?

Browsers ship with defaults that are now 20 years old - there was a cool post here about 8px body padding a while ago. It's not "wrong" it's legacy.

Why is it legacy though? Shouldn't browsers be free to change it?

Re: 58 bytes of CSS to look great nearly everywhere

#14
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…

> 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.

There is a huge amount of research devoted to this. Of course personal preferences exist, but there are physical constraints like the degree to which your eyes can move without turning your neck and other things. It’s somewhere between 60-120 I think, with 80 right in the sweet spot.

Re: 58 bytes of CSS to look great nearly everywhere

#15
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…

> 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.

It's actually smaller than 80 characters.

There has been over a century of research into this. It's why newspapers print their stories in columns, instead of across the entire page, which would be easier.

Re: 58 bytes of CSS to look great nearly everywhere

#16
post #9

What is wrong with browser default styling, and why do browsers ship with something that is wrong?

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…

> Humans are good at reading columns at around roughly 80 characters

Do you have some evidence backing this up? Thanks.

Re: 58 bytes of CSS to look great nearly everywhere

#18
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…

> 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.

Re: 58 bytes of CSS to look great nearly everywhere

#19
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…

> 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.

Just look at any physical book. I also wonder how many people would read Wikipedia more if they serve the mobile version on desktop.
Post reply on HN