Tutorials Bugs Masterclass Free stuff Test pages Proposals

Core tests

Advanced tests

This test

RichInStyle.com tests: selectors test

This tests whether, as 4.1.7 states, the whole block is ignored if there is an error anywhere in the selector.

Should be red

  1. ADD:cheese1, .four17h {color: red}) - cheese1 is a valid token

  2. .xish {cheese: "}"; color: red

Should not be red

  1. <PRE> {color: red}
    
  2. :h(9), .x1 {color: red} (although it should at CSS3 selectors).

  3. .x2, :h(9) {color: red} (although it should at CSS3 selectors).

  4. :h("hello"), .x3 {color: red} (although it should at CSS3 selectors).

  5. .x4, :h("hello") {color: red} (although it should at CSS3 selectors).

  6. .sfour17a + ; .sfour17b {color: red}

  7. .sfour17a + ; .sfour17b {color: red}

  8. should not be red for CSS1 UAs :focus:link, .four17c {color: red}

  9. ADD:1cheese, .four17d {color: red}) - 1cheese is not a valid token, and if a UA cannot parse a selector, it should ignore the whole ruleset.

  10. :1cheese, .four172 {color: red}

  11. .1cheese, .four17p3 {color: red}

  12. .four17po, :1cheese {color: red}

  13. .four17p2, P:1cheese {color: red}

  14. .four17g, 1element {color: red}

  15. .four17e, P & X {color: red}

  16. P & X, .four17f {color: red}

  17. This should not be red - missing closing brace.

  18. This should not be red - missing closing brace and semicolon.

    P ^ X, DIV {color: red} DIV, P ^ X {color: red}).