A 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
58 bytes of CSS to look great nearly everywhere
171–180 of 254 posts
Re: 58 bytes of CSS to look great nearly everywhere
#172Re: 58 bytes of CSS to look great nearly everywhere
#173Re: 58 bytes of CSS to look great nearly everywhere
#174I 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…
That seems both clever and hard to maintain over the long run.
Re: 58 bytes of CSS to look great nearly everywhere
#175Not 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
Re: 58 bytes of CSS to look great nearly everywhere
#176I 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…
> body :not(:is(h1,h2,h3,h4,h5,h6)) { That seems both clever and hard to maintain over the long run.
Re: 58 bytes of CSS to look great nearly everywhere
#177Re: 58 bytes of CSS to look great nearly everywhere
#178I 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…
Re: 58 bytes of CSS to look great nearly everywhere
#179this is too narrow for my liking
Re: 58 bytes of CSS to look great nearly everywhere
#180Earlier quoted context omitted.
The modern approach is to do a universal rest: *, *:before, *:after { all: unset; display: revert; box-sizing: border-box; }
Would that actually work as a safeguard against this? What you're reverting and unsetting to is the very defaults we're talking about changing.