5 ms·
There is no way to specify a good size in CSS - a size that looks good on current computers will be too big on old computers, and a size that looks good on old
by lmm 18d ago
There is no way to specify a good size in CSS - a size that looks good on current computers will be too big on old computers, and a size that looks good on old computers looks too small on current ones. Browsers and users are the ones who can fix this.
- Tepix 18d agoI think your knowledge of CSS might be outdated. What's wrong with the following CSS snippet for example? body { max-width: 70ch; /* Limits the text column to a comfortable reading width */ margin: 0 auto; /* Centers the text column on large screens */ padding: 1.5rem; /* Prevents text from touching the edges on small/mobile screens */ line-height: 1.6; /* Gives the lines room to breathe */ } As for font size, you can use font-size: 1rem; to respect the browser's default font size.
- mrob 18d ago>What's wrong with the following CSS snippet The problem is you're imposing your own idiosyncratic preferences on strangers. Your "improvements" cost valuable screen space. I paid good money for my screen space and I don't appreciate designers unilaterally wasting it because they personally think it looks better. The decision of how much (if any) space to spend on padding should be made by the user.
- mixmastamyk 18d agoLearn how to resize windows, multitasking, tiling, etc. I prefer to have one monitor in portrait but understand many don’t have or not able.
- Tepix 14d agoA website should be readable, even if the browser is set to fullscreen. It could be that the user is on a kiosk system where she can't resize the window or doesn't want to, just to improve legibility.
- mrob 18d agoUseful things to know, but how do they undo a designer wasting my screen space? If you're going to tell me to learn something, it should be CSS. At least Firefox can still be configured to follow its traditional role as "user agent" and allow me to override the bad decisions of designers, by setting toolkit.legacyUserProfileCustomizations.stylesheets and editing chrome/userContent.css . But it would be convenient if more people used the default CSS like danluu.com .
- mixmastamyk 17d agoNot sure, as I don't have any wasted screen space, due to the techniques mentioned above. On really bad sites I try reader view first, View/Page Style/No Style (on Firefox) second, and if that doesn't work I close the tab. Pretty rare though.
- Tepix 17d agoThe designers' job is good usability. Limiting line length is important, humans cannot deal well with extremely long lines of text. This is not a matter of taste.
- mrob 17d agoThere is no objective definition of "extremely long". Whatever value you choose will be incorrect for some readers. Therefore the correct place to set it is in the web browser's preferences (or the window manager if you prefer).
- Tepix 14d agoWell, there are standards such as the WCAG 2.2 Guidelines. There are also large-scale studies. Btw, WCAG recommends 45–75 characters with a limit of 80 characters. Why not follow their recommendation?
- lmm 18d ago> What's wrong with the following CSS snippet for example? It doesn't achieve a reasonable readable font size which was presumably the goal. Your padding won't be the right size for all screens either. (And personally I hate excessive line height). > respect the browser's default font size The browser's defaults are also bad. But they shouldn't be. The browser is in a position to actually fix this; the webdev isn't.
- Tepix 17d ago> The browser's defaults are also bad. What's bad about them? There is a sensible default and users (in particular those with poor eyesight) will adjust them to their needs. Ignoring this default is presumptuous.
- lmm 15d ago> What's bad about them? There is a sensible default and users (in particular those with poor eyesight) will adjust them to their needs. 16pt is a sensible default on some screens and very much not on others. > users (in particular those with poor eyesight) will adjust them to their needs In the real world they won't though, much as we might both wish otherwise.
- Tepix 14d agoGuess what: When you setup your smartphone, it asks you what font size you want. So it's unlikely to be 16pt for everyone.