Live data from Hacker News

58 bytes of CSS to look great nearly everywhere

gist.github.com

181–190 of 254 posts

Re: 58 bytes of CSS to look great nearly everywhere

#182
FYI: It took me an embarrassingly long time to realize that vertical margins overlap to the largest value. So doing p { padding: 1rem 0; } will only separate paragraphs by 1rem, not 2rem as you might think if you add both top and bottom margins. However, there are rules, so throw them into a display: flex and suddenly all your paragraphs have 2rem in between.

CSS is fun.

https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Mod...

Re: 58 bytes of CSS to look great nearly everywhere

#183
post #86
post #84

Earlier quoted context omitted.

Designers want the latitude to place ads where they're likely to be effective. How does an ads company which incidentally also provides a browser balance that interest?

How does an ads company which incidentally also provides a browser balance that interest? Another argument for forced Alphabet breakup. Browser in one corp, on its lonesome. Amusingly, Alphabet has given us the number of new companies. 26. Maybe Chrome can be called C, Google search G of course, M for gmail, etc.

>forced Alphabet breakup

Who will pay C for browser? A for ads. They will pay only for things they need.

Will people (and you?) pay for Chromium browser to compensate its development? It's _expensive_, by the way, to develop that complex project.

So I don't really see how G brakeup helps get better browser for free.

Re: 58 bytes of CSS to look great nearly everywhere

#184

Earlier quoted context omitted.

> body :not(:is(h1,h2,h3,h4,h5,h6)) { That seems both clever and hard to maintain over the long run.

What would make it hard to maintain? (honest question, I'm rather ignorant of CSS)

I like my code to be explicit. Meaning, you are clearly defining explicity what you code should DO.

But using the ":not(:set())" operator, you're making your code implicit. Because you're telling your code what NOT to do (and instead rely on defaults or other side effects to define what will happen to your headings line-height).

Re: 58 bytes of CSS to look great nearly everywhere

#185

See also: https://motherfuckingwebsite.com https://bettermotherfuckingwebsite.com https://perfectmotherfuckingwebsite.com

The second link seems to be down (taking forever to load).

Here's an archive:

https://web.archive.org/web/20220915195112/https://bettermot...

Re: 58 bytes of CSS to look great nearly everywhere

#186

Not explicitly mentioned here, but worth bringing up: Text width should always be constrained to a maximum width to optimize for human reading. Every book ever printed has text with set within the same range for a reason. Full width text guarantees most users will have a poor reading experience.

Newspapers use columns for the same reason, to not get too wide lines. Unfortunately I don't think I've ever seen a site use columns, even though CSS supports it. https://developer.mozilla.org/en-US/docs/Web/CSS/columns

Yes, they've been around forever, but browsers have never properly supported column breaks and orphan control. This tends to make any content with CSS columns unsightly, which is why no one uses them.

Re: 58 bytes of CSS to look great nearly everywhere

#187

See also: https://motherfuckingwebsite.com https://bettermotherfuckingwebsite.com https://perfectmotherfuckingwebsite.com

The second link seems to be down (taking forever to load). Here's an archive: https://web.archive.org/web/20220915195112/https://bettermot...

Maybe it got hugged by HN traffic? Was working fine earlier, but now also hangs for me.

Re: 58 bytes of CSS to look great nearly everywhere

#190
post #163

Earlier quoted context omitted.

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?

There’s no easy way to organize lots of windows, and there is no way your approach would work nice with all web apps, sites and articles in different tabs of the same window. What would be nice is a special element so a user could either enjoy a default width or drag one side of it to resize its margin at both sides, without resizing a window. Or, instead of an element it could be purely a browser viewport-resize fea…

> There’s no easy way to organize lots of windows

Sure there is: Tiling window managers. Available for every desktop OS in some form or another. I assume people who are power users enough to have large, multiple monitors can help themselves.

Post reply on HN