3 ms·
Historical reasons. Default browser styling still carry a lot of heritage from back when screens were 640x480 and you had to squeeze as many lines as possible o
by marginalia_nu 4y ago
Historical reasons. Default browser styling still carry a lot of heritage from back when screens were 640x480 and you had to squeeze as many lines as possible onto the 14" screen.
Of course, if you change the default CSS now that 30 years of HTML have been written to rely on these defaults, almost every website will break.
- marcosdumay 4y agoI doubt this. Almost every website overrides all of the relevant CSS attributes, because the default is just atrocious. Changing the default won't impact them. Anyway, the browsers still can update the CSS and add a "reverse read mode" button that changes it back.
- marginalia_nu 4y agoThey 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.
- BrainVirus 4y agoThe modern approach is to do a universal rest: *, *:before, *:after { all: unset; display: revert; box-sizing: border-box; }
- marginalia_nu 4y agoWould that actually work as a safeguard against this? What you're reverting and unsetting to is the very defaults we're talking about changing.
- marcosdumay 4y agoAs I understand it, it won't protect you. What will protect is actually setting the value (and most sites do that, at least for those few commonly changed ones with bad defaults).
- 411111111111111 4y agoThat'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 <html styling="modern"> 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 matter for the most part.
- mwcampbell 4y agoI 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 accessibility and am visually impaired myself, my perspective on this is skewed. Still, there are clearly others who wish the browser would have more sensible defaults.
- collinmanderson 4y agoIt's probably hard to get everyone to agree on the defaults, especially the width / line-length of content. I think it makes sense to default to no width constraint, zero padding rather than picking something arbitrary. I personally start with 1em padding whereas the author seems to prefer 2em, (or 1.5, or 2ch which is roughly 1em) 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.
- treis 4y agoIt will (maybe) matter in five years when standards have changed and that bare bones framework you grabbed isn't maintained. IMHO it's a fairly big miss that default styling is bad, we're missing basic controls like drag & drop, and there's no native layouts like heros or hamburger menus and so on. A lot of cumulative effort has gone into reimplementing these things thousands of times.
- wpietri 4y agoAllow me to go off on a tangent and say: > 30 years of HTML holy fucking shit