CSS CDO/CDC

If you have any comments to make regarding this test, e-mail ian@hixie.ch.

Prerequisites
Browsers that are subjected to this test should support HTML4 and CSS colour properties. This test will probably confuse browsers unaware that a STYLE block takes CDATA.

The CDO (<!--) and CDC (-->) symbols may appear in certain locations of a stylesheet. In other locations, they should cause parts of the stylesheet to be ignored.

If CDO and CDC are correctly parsed, then all the items in the first list will be green (if any are unstyled, there is a bug in the browser) and all in the second list will be unstyled (if any are red or yellow there is a bug in the browser).

The rest of the document should be unstyled.

1. Allowed

The first set of styles in this document should not be affected by the CDO/CDC around them.

  1. I should be green.
  2. I should be green.
  3. I should be green.
  4. I should be green.
  5. I should be green.
  6. I should be green.
  7. I should be green.
  8. I should be green.
  9. I should be green.
  10. I should be green.
  11. I should be green.

2. Not Allowed

The second set of styles in this document are mixed with CDO and CDC that should result in all rules being ignored.

  1. I should be unstyled.
  2. I should be unstyled.
  3. I should be unstyled.
  4. I should be unstyled.
  5. I should be unstyled.
  6. I should be unstyled. (*)
  7. I should be unstyled.
  8. I should be unstyled. (*)
  9. I should be unstyled.
  10. I should be unstyled. (*)

(*) - These three lines may be red if the browser supports a suggested extension to CSS.

Submit Results

How does your browser fare on this test?


Up to the Evil Tests Page.

Bugzilla: Bug 2781(wontfix, enhancement instead suggested on www-style); Bug 3261 (view source error)

Last updated in January 1999.