Summarized test results:
Selector normalization

Intended audience: users, XHTML/HTML coders (using editors or scripting), script developers (PHP, JSP, etc.), CSS coders, Web project managers, and anyone who wants to know how language declarations work in current browsers.

Updated

These tests user agents normalize away the differences between selector names and class names, and multiple selector names in the same CSS file.

Note that the snapshot summaries of these test results are for released versions of the browsers tested. Versions that are still in development may provide better support for these features. The tests themselves do not test any vendor prefixes.

results

Note that although normalization makes sense, current CSS specifications do NOT require selectors and class names to be normalized prior to matching.

Normalization is important for many languages, where users using different tools can produce the same text but with different mixtures of precomposed, decomposed and partially composed characters. It is particularly an issue if different people author the CSS and the document content. For example, some Vietnamese input methods produce NFC output, but Microsoft keyboards under XP produce unnormalized output where tone marks are separate combining characters but diacritics that differentiate letters are composed with their base character.

To see the test, click on the link in the left-most column. To see detailed results for a single test, click on the link in the right-most column. To submit test data for a single test, click on the link in the right-most column and then follow the link on that page.

The tables show the latest results from the W3C Test Framework. Below the tables are summaries of the results at a given date. The table data may be more up-to-date than the summary. The tables may also contain some incorrectly scored tests, and tests that relate to non-released versions of browsers. These are not included in the summary.

Control tests

Assertion Gecko Presto Trident WebKit Detailed results
markup precomposed, CSS precomposed [Exploratory test] A fully precomposed class name will match a fully precomposed CSS selector name.
markup decomposed, CSS decomposed [Exploratory test] A fully decomposed class name will match a fully decomposed CSS selector name.

Tests 1 and 2 are really just control tests. They are expected to always match, because the bytes sequences are identical in selector and class names. The real tests begin with test 3.

Snapshot summary, 2011-12-17

All browsers passed the control tests.

Matching selector to class name

Assertion Gecko Presto Trident WebKit Detailed results
markup decomposed, CSS precomposed [Exploratory test] A fully decomposed class name will NOT match a fully precomposed CSS selector name.
markup precomposed, CSS decomposed [Exploratory test] A fully precomposed class name will NOT match a fully decomposed CSS selector name.
markup partially decomposed, CSS precomposed [Exploratory test] A partially decomposed class name will NOT match a fully precomposed CSS selector name.
markup partially decomposed, CSS decomposed [Exploratory test] A partially decomposed class name will NOT match a fully decomposed CSS selector name.
markup precomposed, CSS partially decomposed [Exploratory test] A partially decomposed CSS selector name will NOT match a fully precomposed class name.
markup decomposed, CSS partially decomposed [Exploratory test] A partially decomposed CSS selector name will NOT match a fully decomposed class name.

Snapshot summary, 2011-12-17

No user agents tested support any of the following:

  1. matching of selector names with class names when the names are not normalized to the same strings
  2. matching of selector names with other selector names in the same CSS file when the names are not normalized to the same strings

This is likely to pose significant problems for people using CSS internationally if content is not produced in normalized form. This is likely to pose special problems for people who don't know about normalization forms (and shouldn't have to know). As mentioned above, this is most likely problematic when different people are responsible for creating the CSS and the markup.

Normalization during transcoding

Assertion Gecko Presto Trident WebKit Detailed results
normalization during transcoding [Exploratory test] Text is not normalized during transcoding when the style sheet is in another encoding.

Snapshot summary, 2011-12-17

No user agents supported normalization of class names during conversion of legacy encodings.