Accesskey n skips to in-page navigation. Skip to the content start.
These tests check whether user agents normalize away the differences between selector names and class names, and multiple selector names in the same CSS file.
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.
In what follows, 'HTML' means HTML4.01, HTML5 or XHTML 1.0 served as text/html. XML means XHTML 1.0, XHTML5 or XHTML 1.1 served as application/xhtml+xml.
See the results below for user agents tested. This section summarizes the results of those tests.
No user agents tested support any of the following:
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.
These are results for the latest versions of each user agent tested. A green background (yes) means that the assertion associated with the test held true; red (no) means that it did not; orange (partially) means that it was only partially true.
For most browsers, fives types of document format were tested: H4 (HTML 4.01), H5 (HTML5), XH (XHTML 1.0 served as text/html), X (XHTML 1.0 served as XML), X5 (XHTML5), and X11 (XHTML 1.1, served as XML), but since all results were the same for the browsers tested, a single cell is used to represent all five test instances. The exception is Internet Explorer, which doesn't handle XML files, so only the HTML formats were tested.
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 test begins with test 3.
| UA | IE | IE | Firefox | Opera | Safari | Chrome | |
|---|---|---|---|---|---|---|---|
| version | 8 | 7 | 3.6.3 | 10.53 | 4.0.5 | 4.1.249.1064 | |
| OS | XP | XP | XP | XP | XP | XP | |
| date | 20100512 | 20100512 | 20100512 | 20100512 | 20100512 | 20100512 | |
| markup precomposed, CSS precomposedA fully precomposed class name will match a fully precomposed CSS selector name. | yes | yes | yes | yes | yes | yes | H4 H5 XH X X5 X11 |
| markup decomposed, CSS decomposedA fully decomposed class name will match a fully decomposed CSS selector name. | yes | yes | yes | yes | yes | yes | H4 H5 XH X X5 X11 |
Link to tests: Selector normalization
Assertion:
| UA | IE | IE | Firefox | Opera | Safari | Chrome | |
|---|---|---|---|---|---|---|---|
| version | 8 | 7 | 3.6.3 | 10.53 | 4.0.5 | 4.1.249.1064 | |
| OS | XP | XP | XP | XP | XP | XP | |
| date | 20100512 | 20100512 | 20100512 | 20100512 | 20100512 | 20100512 | |
| markup decomposed, CSS precomposedA fully decomposed class name will NOT match a fully precomposed CSS selector name. | yes | yes | yes | yes | yes | yes | H4 H5 XH X X5 X11 |
| markup precomposed, CSS decomposedA fully precomposed class name will NOT match a fully decomposed CSS selector name. | yes | yes | yes | yes | yes | yes | H4 H5 XH X X5 X11 |
| markup partially decomposed, CSS precomposedA partially decomposed class name will NOT match a fully precomposed CSS selector name. | yes | yes | yes | yes | yes | yes | H4 H5 XH X X5 X11 |
| markup partially decomposed, CSS decomposedA partially decomposed class name will NOT match a fully decomposed CSS selector name. | yes | yes | yes | yes | yes | yes | H4 H5 XH X X5 X11 |
| markup precomposed, CSS partially decomposedA partially decomposed CSS selector name will NOT match a fully precomposed class name. | yes | yes | yes | yes | yes | yes | H4 H5 XH X X5 X11 |
| markup decomposed, CSS partially decomposedA partially decomposed CSS selector name will NOT match a fully decomposed class name. | yes | yes | yes | yes | yes | yes | H4 H5 XH X X5 X11 |
Link to tests: Selector normalization
Assertion:
| UA | IE | IE | Firefox | Opera | Safari | Chrome | |
|---|---|---|---|---|---|---|---|
| version | 8 | 7 | 3.6.3 | 10.53 | 4.0.5 | 4.1.249.1064 | |
| OS | XP | XP | XP | XP | XP | XP | |
| date | 20100512 | 20100512 | 20100512 | 20100512 | 20100512 | 20100512 | |
| selectors with different normalizationSelectors that only differ due to normalization should be treated as different. | yes | yes | yes | yes | yes | yes | H4 H5 XH X X5 X11 |
Link to tests: Selector normalization
Assertion:
| UA | IE | IE | Firefox | Opera | Safari | Chrome | |
|---|---|---|---|---|---|---|---|
| version | 8 | 7 | 3.6.3 | 10.53 | 4.0.5 | 4.1.249.1064 | |
| OS | XP | XP | XP | XP | XP | XP | |
| date | 20100512 | 20100512 | 20100512 | 20100512 | 20100512 | 20100512 | |
| normalization during transcoding[Exploratory test] Text is not normalized during transcoding when the style sheet is in another encoding. | n/a1 | n/a1 | n/a1 | yes | yes | yes | H4 H5 XH X X5 X11 |
Link to tests: Selector normalization
Assertion:
Notes:
Tell us what you think (English).
Content first published 2009-01-29. Last substantive update 2010-05-13 13:27 GMT. This version 2010-05-13 13:27 GMT
For the history of document changes, search for results-selector-normalization in the i18n blog.
Copyright © 2007-2010 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply. Your interactions with this site are in accordance with our public and Member privacy statements.