- From: Yves Lafon <ylafon@w3.org>
- Date: Wed, 14 May 2008 06:20:12 -0400 (EDT)
- To: www-validator-css@w3.org
- Cc: Olivier Thereaux <ot@w3.org>
The conflict detection algorithm has been revamped, you can test this on http://qa-dev.w3.org:8001/css-validator/ Here is a small collection of tests relative to this issue: Cheers, 1/ 'Exact Attribute' against the others. * Exact span[hello="Cleveland"][goodbye="Columbus"] { color: blue; } -> 0 warnings span[hello="Cleveland"][hello="Columbus"] { color: blue; } -> 1 warning * Begin (|=) span[tst="foo-bar"][tst|="foo"] { color: blue; } -> 0 warnings span[tst="foo"][tst|="foo"] { color: blue; } -> 0 warnings span[tst="foobar"][tst|="foo"] { color: blue; } -> 1 warning span[tst="foo"][tst|="foobar"] { color: blue; } -> 1 warning * Start (^=) span[tst="foo"][tst^="foo"] { color: blue; } -> 0 span[tst="foo-bar"][tst^="foo"] { color: blue; } -> 0 span[tst="foobar"][tst^="foo"] { color: blue; } -> 0 span[tst="foobar"][tst^="fooc"] { color: blue; } -> 1 * Contains (*=) span[tst="foo-bar"][tst*="foo"] { color: blue; } -> 0 span[tst="barfoobar"][tst*="foo"] { color: blue; } -> 0 span[tst="barfobar"][tst*="foo"] { color: blue; } -> 1 span[tst="barfoo"][tst*="foo"] { color: blue; } -> 0 * Ends ($=) span[tst="barfoo"][tst$="foo"] { color: blue; } -> 0 span[tst="foo"][tst$="foo"] { color: blue; } -> 0 span[tst="foobar"][tst$="foo"] { color: blue; } -> 1 span[tst="foobar"][tst] { color: blue; } -> 0 * OneOf span[tst="foo"][tst~="foo bar glop toto"] { color: blue; } -> 0 span[tst="bar"][tst~="foo bar glop toto"] { color: blue; } -> 0 span[tst="foo bar"][tst~="foo bar"] { color: blue; } -> 1 span[tst="hello"][tst~="foo bar"] { color: blue; } -> 1 span[tst="bar"][tst~="foo bar"] { color: blue; } -> 0 2/ Begin attributes (|=) against the other (but Exact; see above). * Begin span[tst|="foo-bar"][tst|="foo"] { color: blue; } -> 0 span[tst|="foo"][tst|="foo"] { color: blue; } -> 0 span[tst|="foo-bar"][tst|="foobar"] { color: blue; } -> 1 span[tst|="foobar"][tst|="foo"] { color: blue; } -> 1 * Start span[tst|="foobar"][tst^="foo"] { color: blue; } -> 0 span[tst|="foo"][tst^="foo"] { color: blue; } -> 0 span[tst|="foo"][tst^="foobar"] { color: blue; } -> 1 span[tst|="foo"][tst^="foo-bar"] { color: blue; } -> 0 * OneOf span[tst|="foo"][tst~="foo bar glop toto"] { color: blue; } -> 0 span[tst|="bar"][tst~="foo bar glop toto"] { color: blue; } -> 0 span[tst|="bar"][tst~="foo bar-glop toto"] { color: blue; } -> 0 span[tst|="bar"][tst~="foo barglop toto"] { color: blue; } -> 1 span[tst|="foo bar"][tst~="foo bar"] { color: blue; } -> 1 span[tst|="hello"][tst~="foo bar"] { color: blue; } -> 1 span[tst|="bar"][tst~="foo bar"] { color: blue; } -> 0 3/ Start With (^=) against the others (but Exact, Begin; see above) * OneOf span[tst^="foo"][tst~="foo bar glop toto"] { color: blue; } -> 0 span[tst^="bar"][tst~="foo bar glop toto"] { color: blue; } -> 0 span[tst^="bar"][tst~="foo bar-glop toto"] { color: blue; } -> 0 span[tst^="bar"][tst~="foo barglop toto"] { color: blue; } -> 0 span[tst^="foo bar"][tst~="foo bar"] { color: blue; } -> 1 span[tst^="hello"][tst~="foo bar"] { color: blue; } -> 1 span[tst^="bar"][tst~="foo bar"] { color: blue; } -> 0 4/ OneOf (~=) against the other (but Exact, Begin, Start; see above) * Contains (*=) span[tst*="foo"][tst~="foo bar glop toto"] { color: blue; } -> 0 span[tst*="p t"][tst~="foo bar glop toto"] { color: blue; } -> 1 span[tst*="lo"][tst~="foo bar glop toto"] { color: blue; } -> 0 span[tst*="le"][tst~="foo bar glop toto"] { color: blue; } -> 1 * Ends ($=) span[tst$="ar"][tst~="foo bar glop toto"] { color: blue; } -> 0 span[tst$="foo"][tst~="foo bar glop toto"] { color: blue; } -> 0 span[tst$="to"][tst~="foo bar glop toto"] { color: blue; } -> 0 span[tst$="le"][tst~="foo bar glop toto"] { color: blue; } -> 1 span[tst$="p toto"][tst~="foo bar glop toto"] { color: blue; } -> 1 * OneOf (~=) span[tst~="foo"][tst~="foo bar glop toto"] { color: blue; } -> 0 span[tst~="glop"][tst~="foo bar glop toto"] { color: blue; } -> 0 span[tst~="bar foo"][tst~="foo bar glop toto"] { color: blue; } -> 0 span[tst~="boo far"][tst~="foo bar glop toto"] { color: blue; } -> 1 -- Baroula que barouleras, au tiéu toujou t'entourneras. ~~Yves
Received on Wednesday, 14 May 2008 10:20:42 UTC