Chimanrao <chimanrao (AT) gmail (DOT) com> scripsit:
Quote:
I have a style-sheet in which the font-size is specified as 0em. |
Why? If you want to suggest that some text be not rendered at all, use
display: none.
Quote:
IE renders it with very small font (like 1 pt size).
FireFox does not render the text at all.
Safari renders it with default system font.
Which browser is correct? |
All of them, as far as this behavior is considered.
Quote:
Does the CSS standard say anything about this? |
There is no CSS standard. There is CSS 2.0 recommendation, which is not
really recommended by anyone, and there is the CSS 2.1 proposal, which says
that it is work in progress and should not be cited otherwise.
But the general principle is that a value may be "approximated":
"A used value is in principle the value used for rendering, but a user agent
may not be able to make use of the value in a given environment. For
example, a user agent may only be able to render borders with integer pixel
widths and may therefore have to approximate the computed width, or the user
agent may be forced to use only black and white shades instead of full
colour. The actual value is the used value after any approximations have
been applied."
http://www.w3.org/TR/CSS21/cascade.html#actual-value
(CSS 2.0 spec says explicitly, in the same context: "The actual value of
this property may differ from the computed value due a numerical value on
'font-size-adjust' and the unavailability of certain font sizes." It seems
that they just removed the sentence when removing font-size-adjust, but they
hardly meant to remove the idea that the actual size may differ from the
computed value due to "the unavailability of certain font sizes".)
The nature of "approximation" for font-size has not been defined. Thus, a
declared font size of zero might reasonably be implemented as such (i.e.,
characters are rendered as zero-size glyphs) or using the smallest available
actual font size. Using the default size is somewhat more eccentric
(assuming that there is some smaller size available) but might fit into a
liberal definition of "approximation". :-)
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/