7 ms·
From the article: My suggestion for you is to do the following: start your CSS stylesheet with html { font-size: 62.5%; } NO, NO,
by orib 18y ago
From the article:
My suggestion for you is to do the following: start
your CSS stylesheet with
html {
font-size: 62.5%;
}
NO, NO, AND NO! I set my font size to what it is for a reason. Web designers need to learn to deal with it. If you're manually tweaking font sizes, you're doing it wrong. Please, leave them at the default values; they're that way for a reason. I want a website that doesn't cause eye strain. Make sure your site scales, and things work without absolute pixel sizes.
- cschneid 18y agoBut, since it then allows the developer to use em measurements everywhere, doesn't that allow your override font size to look better on the page?
- run4yourlives 18y agoThe only reason he uses em and not px is because IE won't let the user resize the text if the size is specified in pixels. Every other browser handles font sizes specified in pixels just fine.
- orib 18y agoThey could simply use em measurements everywhere before. Actually, the size of an 'em' isn't even defined relative to the size of a pixel by the CSS spec, so the claim in the article is dead wrong about it helping you use em when you mean 10 pixels. 62.5% of an unknown value isn't 10 pixels.
- avinashv 18y agoNot quite--what you are doing is setting the font-size, and hence the 'em' to 10px. px and em are both independently relative to the font-size. There is nothing about the size of a pixel mentioned here. It would also be very naive to argue that working in units of 10 is not much, much more convenient than working in units of 16.
- orib 18y agoTo quote the CSS 2.0 spec: The 'em' unit is equal to the computed value of the 'font-size'... Therefore, em is in units of font size, and is not independent of it. It's totally unrelated to 'px' values, except by luck. Not all browsers default to 16px text. (And yes, it's true that px are actually defined as the distance subtended by an angle of 0.0227 degrees at a typical viewing distance of the device, but they're typically used interchangably with screen pixels)
- run4yourlives 18y agoYou know, if you use a user style sheet with !important you can keep your precious font sizes just the way you want them. The rest of us want a webpage that is pleasing to look at.
- orib 18y agoWhat part of respecting a user's settings makes a website ugly? If a website is properly designed, it should scale just fine no matter what the font size is. If you need a fixed pixel size for a font to make your design work, you're doing it wrong. And to top it off, a fixed pixel size requirement means it'll break anyways on different systems with different fonts, kerning and hinting options, and other settings.b
- run4yourlives 18y agoThe part when user become users. When you get right down to it, by the time you've accounted for every little preference you're asking websites to be text files, which kinda defeats the whole purpose of design.
- gnaritas 18y ago> The rest of us want a webpage that is pleasing to look at. The default font size is pleasing to look at, that's why it's the default size. You kids need to get over the idea that everyone loves squinting at tiny fonts, they don't.
- Hexstream 18y agoEvery time I read "!important" it comes out in my head as "not important" :/
- BrandonM 18y agoI don't really know what you're talking about here. I can press CTRL-+ on both the linked article and on his sample site (linked at the bottom), and the font size increases as I would expect it to.