58 bytes of CSS to look great nearly everywhere
131–140 of 254 posts
Re: 58 bytes of CSS to look great nearly everywhere
#132I wrote my version here last year: https://www.swyx.io/css-100-bytes html { max-width: 70ch; padding: 3em 1em; margin: auto; line-height: 1.75; font-size: 1.25em; } if you have 100 more to spare: h1,h2,h3,h4,h5,h6 { margin: 3em 0 1em; } p,ul,ol { margin-bottom: 2em; color: #1d1d1d; font-family: sans-serif; } explanation in the blogpost
Re: 58 bytes of CSS to look great nearly everywhere
#133Do you still have to explicitly add CSS to do something appropriate for the user's dark mode setting? I'd rather not specify any colors at all and just let the browser use system defaults, but last time I checked, that used black-on-white even in dark mode.
Re: 58 bytes of CSS to look great nearly everywhere
#134A comparison using danluu's website: Default: https://postimg.cc/k2Zwffms With the 100 bytes version: https://postimg.cc/645d9vKT
Re: 58 bytes of CSS to look great nearly everywhere
#135Earlier quoted context omitted.
I had to through my saved favorites, but I knew what you were talking about. From 5(!) years ago: https://jgthms.com/web-design-in-4-minutes/
Great, with one nitpick: "Black text on a white background can be harsh on the eyes. Opting for a softer shade of black for body text" Why are people so afraid of black text on white background?! In the end, after all the colors and custom fonts the website has gray text with poor readability which instantly fails WCAG AAA. Had he kept #555 (which is still not ideal), the author would have had a WCAG AAA-compliant de…
Re: 58 bytes of CSS to look great nearly everywhere
#136Earlier 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.
Re: 58 bytes of CSS to look great nearly everywhere
#137What is wrong with browser default styling, and why do browsers ship with something that is wrong?
> What is wrong with browser default styling, and why do browsers ship with something that is wrong? The problem with browser default styling is that there should be another level: user default styling. I.e., the styling as chosen by the user.
Why does every website have to reinvent the wheel?
Re: 58 bytes of CSS to look great nearly everywhere
#138Is there a html/css only way to automatically “columnize” text into multiple columns of reasonable width?
There is the columns CSS property: https://developer.mozilla.org/docs/Web/CSS/columns You probably don't want to apply it to a whole document because then you need to scroll back to the top to read the second half. But it can be effective to columnize text sections between headings.
Re: 58 bytes of CSS to look great nearly everywhere
#139I've got a screen that is much wider than it is tall, this throws away so much of it. It's as bad as Facebook, where the stuff you want to see is a band about 1/4 the area of the screen.
Re: 58 bytes of CSS to look great nearly everywhere
#140I think this does not work well for mobile devices. Spacing and the font size is too large. Hence, a lot of screen space is wasted and the user has to scroll more. Larger font sizes on mobile are usually not a good idea as the device tends to be closer to your eyes anyway. A snippet that could work better in my opinion is the following: html { max-width: 70ch; /* larger spacing on larger screens, very small spacing o…
> Hence, a lot of screen space is wasted and the user has to scroll more Unfortunately that appears to be the case for a great many sites when viewed on a mobile device. My current pet hate is British Airways, https://www.britishairways.com/travel/home/public/en_gb/ has so much wasted space that on my Pixel I have to scroll to reach the buttons "Manage My Booking" and "Check In". Further down the page the "Your accou…