
IE 9 does not resize text sized in pixels - toni
http://www.456bereastreet.com/archive/201010/ie_9_does_not_resize_text_sized_in_pixels/
======
pornel
I actually like this behavior.

Sometimes I need text to match size of background-image that is not scaled and
has size in pixels (especially important if you use CSS sprites).

In other places I can use `em` to signify that text can be freely enlarged and
won't break layout.

iPhone and WP7 IE have -(webkit|ms)-text-size-adjust for this.

~~~
gxti
I agree that it's a sensible behavior -- I've always wondered why the 'px'
unit even exists if it scales just like everything else. That said, what does
the CSS standard say?

~~~
blahedo
It's a little complicated and (I'd argue) mildly broken[1], but roughly, 'in',
'cm', and 'pt' all refer to real-world distance measurements; 'em', 'en', and
'ex' refer to sizes relative to the font size; 'px' is a modified real-world
measure that scales with distance[2]; and there is nothing at all that refers
to actual, honest-to-god pixels. Scaling 'px' during a zoom is no more
standards-violating than scaling 'in' etc. during a zoom.

[1]Because 'px' doesn't refer to pixels.

[2]It refers to a unit that scales according to display resolution and usual
distance from eye; essentially it's a measure of the angle subtended on your
retina. This is useful because (in theory) 1px will look "the same size" (and
be about as legible) on a mobile phone, on a laptop, on a desktop, or on a
projector, whereas 1in or 1pt(=1/72in) will appear much smaller if further
away. What 1px is not, however, is a "pixel".

~~~
seabee
Now comes the question: if 'px' isn't it, is there _any_ unit that corresponds
1:1 with a bitmapped image?

~~~
wmf
At default zoom level, 1 px should be 1 pixel except on "retina" displays
where it is 2 pixels or printers where it is 3-5 dots.
<http://webkit.org/blog/55/high-dpi-web-sites/>
<http://www.w3.org/TR/CSS21/syndata.html#length-units>

------
kamechan
This behavior not only seems sensible to me but appropriate. If one uses
pixels then one wants a pixel-perfect layout so therefore doesn't want fonts
to scale.

~~~
wait
And that's a huge problem. The notion of a "pixel-perfect design" doesn't
belong on the web. In the case you mention, you're sacrificing accessibility
for control over what your users see. You're kind of telling your users that
you know what they want better then they do. That they should be able to read
the small type you put in front of them, even if their eyes are bad.

CognitiveLens is right. Proportions matter.

(Note: when I say "you", I refer to the "one [who] wants a pixel-perfect
layout" which may or not actually be you.)

~~~
drdaeman
> The notion of a "pixel-perfect design" doesn't belong on the web.

So, if this is the case, then "px" units and raster graphics should not belong
on the Web, too. But unfortunately, they do.

IMHO, the best approach would be to have two zoom modes. Some users prefer
scaling text, but keeping images inact (so they won't see upscale ugliness),
others prefer "screen magnifier"-like behavior. And _none_ of those behaviors
is wrong.

------
efsavage
This is the way the CSS spec was written. Firefox (and then KHTML)
specifically went against the spec. This is because they didn't have page
zoom, and too many developers were using px because it was far more consistent
than any other unit across browsers.

From CSS2 spec:

"Relative units are: * em: the 'font-size' of the relevant font * ex: the
'x-height' of the relevant font * px: pixels, relative to the viewing device"

Changing font size doesn't affect your device (browser), but zooming does.

------
cemregr
95% of the web pages out there (I totally made that number up) use 'px' to
specify font sizes. Had we designers/developers been more sensible and
popularized 'em', I wouldn't mind this.

But I think this greatly undermines accessibility, and accessibility is way
more important than pixel-perfect layouts.

