Re: order of properties

On 12 Mar 2003, at 6:47, Christoph wrote:

> 
> "Ernest Cline" <ernestcline@mindspring.com>:
> > 
> > .boldtext {font:serif; font-weight:bold}
> > 
> > causes the text to be bold.
> 
> Sure, because "font:serif", being invalid, is ignored.
> 
>   .boldtext {font: 1em serif; font-weight: bold}
> 
> would be bold, too.

"font:serif" is perfectly valid. Check
http://www.w3.org/TR/REC-CSS2/fonts.html#font-shorthand

and you'll see that it is the same as specifying:

  font-style:normal;
  font-variant:normal;
  font-weight:normal;
  font-size:medium;
  line:height:normal;
  font-family:serif;
  font-stretch:normal;
  font-size-adjust none;

I'll grant that in the absence of any previous declarations on a 
browser that has the default font set to the serif font, that there 
would be no effect from such a rule, but that's not the same as it 
being invalid.

Received on Wednesday, 12 March 2003 13:09:09 UTC