W3C home > Mailing lists > Public > www-style@w3.org > October 2004

Re: Error Parsing

From: Christian Roth <roth@visualclick.de>
Date: Fri, 22 Oct 2004 13:14:28 +0200
To: "www-style Mailing List" <www-style@w3.org>
Message-Id: <20041022121428.28674@mail.visualclick.de>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:34 GMT