W3C home > Mailing lists > Public > www-style@w3.org > January 2000

Re: Hash

From: L. David Baron <dbaron@fas.harvard.edu>
Date: Mon, 24 Jan 2000 09:14:55 -0500 (EST)
Message-Id: <200001241414.JAA05061@is04.fas.harvard.edu>
To: www-style@w3.org
On Mon, 24 Jan 2000 03:38:35 -0800 (PST),
=?iso-8859-1?q?Matthew=20Brealey?= (thelawnet@yahoo.com) wrote:
> There is rather a gulf between what CSS says about identifiers and what
> HTML says:

That isn't necessarily a problem.  If an identifier that is valid in
HTML cannot be represented in CSS, then the problematic characters can
be escaped.  If an identifier valid in CSS cannot occur in HTML, then
it can't occur in an HTML document.  It might be possible in some
application of XML, so it shouldn't be excluded from CSS.

> Correct would be:
> HASH = #{name}
> name = {namestart}{namechar}+
> namestart = [a-zA-Z]|{escape}
> namechar = [a-z0-9-]|{escape}

That wouldn't work, because it wouldn't match the HASH in 'color:
#00ff00;'.  If there were separate tokens for id selectors and colors,
how would they be distinguished for a color that could match both
(e.g., 'color: #ffc')?

> Having proposed these changes, I also have a question - should invalid
> (HTML) IDs result in the ruleset being ignored - can invalid IDs be
> parsed?

HTML does not specify error-handling behavior.


L. David Baron    Sophomore, Harvard (Physics)    dbaron@fas.harvard.edu
Links, SatPix, CSS, etc.     <URL: http://www.fas.harvard.edu/~dbaron/ >
WSP CSS AC                      <URL: http://www.webstandards.org/css/ >
Received on Monday, 24 January 2000 09:14:56 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:52 UTC