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

Case sensitivity in CSS: some tests

From: Richard Ishida <ishida@w3.org>
Date: Wed, 09 Jan 2013 16:00:59 +0000
Message-ID: <50ED943B.5000404@w3.org>
To: www International <www-international@w3.org>, W3C Style <www-style@w3.org>
Fwiw, I began today to put together some tests about how case is handled 
in the following cases in HTML+CSS:

- element names and selectors with different case
- attribute names and selectors...
- attribute values and ...
- class names ...
- list-style-type values in different cases
- counter-reset, counter-increment and the counter function and case 

I haven't had time to fold these into our test suite and produce results 
summaries, but I'll outline below my initial findings.

See the first test at 
  and click on 'Next test' in the top right corner to see the others.


Selectors and HTML element tags match regardless of case (this is 
constrained to ASCII).

Selectors and HTML attribute names match regardless of case (this is 
constrained to ASCII).

Selectors and HTML attribute values do NOT match where case is 
different. Class names using .classname syntax in the selector are a 
variant of this that produces the same results except for Opera, which 
matches regardless of case (though doesn't match general attribute values).

Predefined list-style-type values produce the desired effect whether or 
not an upper case value is used (this is constrained to ASCII).

Counters are a little more complicated. Basically, if the 
counter-increment property and counter function refer to a user defined 
counter style using different casing, the display fails. Otherwise, case 
is irrelevant. This same behaviour occurred whether the names were in 
ASCII, Latin1 or Cyrillic characters.

I tested in Firefox, Opera and Chrome on Mac and IE9 on Windows7, and 
got the same results. (These are standards-mode tests.)

Hope that helps.

Richard Ishida
Internationalization Activity Lead
W3C (World Wide Web Consortium)

Received on Wednesday, 9 January 2013 16:01:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:25 UTC