Re: Error Parsing

So by now, we have found that the actual result of

>p {
>color:red;
>*/
>}

is 

p { color: red; }

and that consequently, WebCore (Safari) and the W3C CSS validator have a
bug. Note that the result would have been different if Philippe had
written it as:

p {
  color: red
  */
  }

in which case the result would have been the empty stylesheet.
Now, I have a corollary question as follows. What is the result of this
stylesheet:

p {
  color: red;
  /*
  font-size: 12pt;
  }
div {
  float: left;
}

According to CSS21 parsing rules, it must be:

p {
  color: red;
  }
div {
  float: left;
}

However, I'm wondering if this is what the general user expects from the
code given. Can this still be grasped (rather) intuitively without having
to delve into the CSS parsing spec? I, for one, would have expected at
first glance the result to be the empty stylesheet based on the comment
open character sequence "/*" (as - IMO wrongly - does the W3C CSS Validator).

Regards, Christian.

Received on Friday, 22 October 2004 11:15:04 UTC