- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Thu, 02 Aug 2007 20:05:08 -0400
- To: Ray Kiddy <ray@ganymede.org>
- CC: public-css-testsuite@w3.org
- Message-ID: <46B27134.9090406@inkedblade.net>
Ray Kiddy wrote:
>
> Hello -
Hey Ray,
Sorry it took awhile to get to this, I had my hands full with getting bug
379349 done before the 1.9 freeze.
> I was looking at one of the tests:
> http://www.w3.org/Style/CSS/Test/CSS2.1/current/t040103-ident-03-c.htm
>
> On my Firefox (Mac OS X, nightly build of FF 3.0a7pre from 7/20/2007),
> it shows up red. I added a note about this test to:
>
> https://bugzilla.mozilla.org/show_bug.cgi?id=12385.
> CSS idents can't start with "-"
>
> Some of the FF people suggest the CSS test is wrong. In looking at the
> spec (http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier), it
> looks as though a hyphen is allowed at the start of an identifier,
> unless the hyphen is followed by a digit. If I am understanding, then
> perhaps t040103-ident-03-c.htm can be as below.
>
> Or am I wrong?
No, you're right. :) The test needs to be fixed. Your code has a couple of
mistakes in it, though.
> .three { color: green; background: white; }
> .-1ident, .one { color: red; }
>
> .four { color: green; background: white; }
> #-1ident, .two { color: red; }
I'm guessing you meant .three and .four there.
> .five { color: green; background: white; }
> .-\1ident, .one { color: red; }
>
> .six { color: green; background: white; }
> #-\1ident, .two { color: red; }
The class and ID here are actually valid, because identifiers are allowed
to contain escaped anything. See the note at the end of section 4.1.3:
http://www.w3.org/TR/CSS21/syndata.html#characters
I swapped the colors and changed the escape to represent '1' instead of
U+0001. (Hexadecimal digits can't be escaped with a backslash: they'd be
indistinguishable from Unicode escapes otherwise.)
Here's the diff. Check it. If it looks good to you, I'll check it in.
~fantasai
? raydiff
Index: t040103-ident-03-c.xht
===================================================================
RCS file: /sources/public/CSS/CSS2.1-test-suite/cooked-tests/dbaron-20041214/t040103-ident-03-c.xht,v
retrieving revision 1.3
diff -u -r1.3 t040103-ident-03-c.xht
--- t040103-ident-03-c.xht 2 Aug 2007 23:53:24 -0000 1.3
+++ t040103-ident-03-c.xht 2 Aug 2007 23:55:36 -0000
@@ -3,14 +3,27 @@
<head>
<title>CSS 2.1 Test Suite: Characters and Case</title>
<link rel="author" title="L. David Baron" href="http://dbaron.org/"/>
+ <link rel="author" title="Ray Kiddy" href="mailto:ray@ganymede.org"/>
<link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters"/>
<style type="text/css">
- .one { color: green; background: white; }
- .-ident, .one { color: red; }
+ .one { color: red; background: white; }
+ .-ident, .one { color: green; }
- .two { color: green; background: white; }
- #-ident, .two { color: red; }
+ .two { color: red; background: white; }
+ #-ident, .two { color: green; }
+
+ .three { color: green; background: white; }
+ .-1ident, .three { color: red; }
+
+ .four { color: green; background: white; }
+ #-1ident, .four { color: red; }
+
+ .five { color: red; background: white; }
+ .-\31ident, .five { color: green; }
+
+ .six { color: red; background: white; }
+ #-\31ident, .six { color: green; }
</style>
</head>
@@ -18,6 +31,10 @@
<p class="one">This should be green.</p>
<p class="two">This should be green.</p>
+ <p class="three">This should be green.</p>
+ <p class="four">This should be green.</p>
+ <p class="five">This should be green.</p>
+ <p class="six">This should be green.</p>
</body>
</html>
Received on Friday, 3 August 2007 00:05:18 UTC