Earlier quoted context omitted.
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
Personally I find column-style layout to be more difficult on the web. Though probably just due to lack of familiarity. As one example, the "Golf with your Friends" subreddit always throws me for a loop due to its use of columns. I have no idea how to read it! https://old.reddit.com/r/GWYF/ Note this example will only work on a widescreen desktop browser.
58 bytes of CSS to look great nearly everywhere
231–240 of 254 posts
Re: 58 bytes of CSS to look great nearly everywhere
#232Earlier quoted context omitted.
hopefully not too dumb a question, but why put this on html instead of body?
Au contraire. That is good question. Everything in the snippet except the font-size should also work with the body selector. The font-size is an exception here as it defines the root font size that the `rem` unit is based on. And that has to be defined on html. https://css-tricks.com/html-vs-body-in-css/
Re: 58 bytes of CSS to look great nearly everywhere
#233Earlier quoted context omitted.
I don't know what the right metric is but i simply can't read those sites that present you with a mobile-like layout with two paragraphs per screen on a 24" monitor. If the text is too small I can hit Cmd - Plus but with those i have no recourse.
It's not mobile-like, it's just legible. Just because you have a 24" monitor doesn't mean the text should take all the width, that's terrible.
Re: 58 bytes of CSS to look great nearly everywhere
#234Earlier quoted context omitted.
That's true, but there could theoretically be more then one default. I'm not arguing in favour of it, just pointing out the possibility. it would be pretty simple to create a so that it's opt-in. I personally just don't see the point. There are a lot of bare bone frameworks around and if you're doing a static website (which would likely be the only type to benefit from that)... The <10 kilobytes gzipped css won't mat…
I would still appreciate an opt-in "modern" default that browser developers should feel free to change going forward. For me, it's not about minimizing download size; it's about maintaining a proper division between content and functionality, which are what I as an author and developer provide, and appearance, which should be up to the user agent, to best meet the user's needs and preferences. Sure, since I work on a…
Browsers used to default to adding margin/padding automatically to documents (Quirks Mode), but modern html includes a doctype to use "Standards Mode" which is more sane.
At the same time it would be nice to default to sans-serif typeface and line-height around 1.5 but it starts getting arbitrary very quickly and it's nice to build on something that doesn't change over time.
Re: 58 bytes of CSS to look great nearly everywhere
#235A comparison using danluu's website: Default: https://postimg.cc/k2Zwffms With the 100 bytes version: https://postimg.cc/645d9vKT
That line spacing is obnoxiously big tho
It often can look better to have more whitespace, but it lowers information density. It depends on the situation.
Re: 58 bytes of CSS to look great nearly everywhere
#236Earlier quoted context omitted.
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
Columns like those are a bit awkward when combined with scrolling long blocks of text. When you reach the bottom of one column, do you need to scroll back up to get to the top of the next? Or do you have the column fit the height of the screen and have some sort of horizontal scrolling for as many columns as it takes.
https://en.wikipedia.org/wiki/Dead_Sea_Scrolls#/media/File:G...
Re: 58 bytes of CSS to look great nearly everywhere
#237Earlier quoted context omitted.
I don't get this: > font-family: system-ui Why render texts with the font that the reader has selected for a different function, ignoring the one that she has selected for texts?
MDN[0] says: > Glyphs are taken from the default user interface font on a given platform. Because typographic traditions vary widely across the world, this generic is provided for typefaces that don't map cleanly into the other generics. So it might have been used to make the snippet "truly" universal for the developer using it. That said, I believe it would be better to choose the font family based on the content. E…
Re: 58 bytes of CSS to look great nearly everywhere
#238Earlier quoted context omitted.
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 h…
I really hate this if that's true, because the net effect does seem to be that I have to spend more time on a page to determine if the content is garbage or not. With physical books, you could flip through pages and catch things you're interested in by glancing over large areas. The modern web, for whatever reason, is doing quite a bit to prevent that from being possible on our screens without hacking our own browsers to fix the mess.
Re: 58 bytes of CSS to look great nearly everywhere
#239Earlier quoted context omitted.
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
Columns like those are a bit awkward when combined with scrolling long blocks of text. When you reach the bottom of one column, do you need to scroll back up to get to the top of the next? Or do you have the column fit the height of the screen and have some sort of horizontal scrolling for as many columns as it takes.
I've experimented with this style on Wikipedia, with separate columns under each headline. It usually works well.
Re: 58 bytes of CSS to look great nearly everywhere
#240Earlier quoted context omitted.
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
Personally I find column-style layout to be more difficult on the web. Though probably just due to lack of familiarity. As one example, the "Golf with your Friends" subreddit always throws me for a loop due to its use of columns. I have no idea how to read it! https://old.reddit.com/r/GWYF/ Note this example will only work on a widescreen desktop browser.