benjamin@webkit.org | f28f8d1 | 2014-12-02 02:29:53 +0000 | [diff] [blame] | 1 | <!doctype html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <style> |
| 5 | target { |
| 6 | display: block; |
| 7 | margin: 2px; |
| 8 | } |
| 9 | </style> |
| 10 | </head> |
| 11 | <body> |
| 12 | <p>This test the specificity of :nth-last-child() with dynamic specificity of compound selectors. If the test pass, the style of each line should match its text description.</p> |
| 13 | <div> |
| 14 | <target>Black text.</target> |
| 15 | <target>Black text.</target> |
| 16 | <target style="color:white; background-color:red; border: 5px solid black;">White text on red background with black border.</target> |
| 17 | <target style="color:red; border: 5px solid black;">Red text with black border.</target> |
| 18 | <target style="color:white; background-color:red; border: 5px solid purple;">White text on red background with purple border.</target> |
| 19 | <target style="border: 5px solid blue;">Black text with blue border.</target> |
| 20 | <target style="color:white; background-color:red; border: 5px solid purple;">White text on red background with purple border.</target> |
| 21 | <target style="color:red; background-color:green; border: 5px solid blue;">Red text on green background with blue border.</target> |
| 22 | </div> |
| 23 | </body> |
| 24 | </html> |