attribute-007

Selectors: Attribute selectors: Substring matching with the universal selector

WeasyPrint

This browser

Assertion
Browsers should apply each rule to the elements which have an hyphen-separated list of attribute values

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3  <head>
 4   <title>CSS Test: Selectors: Attribute selectors: Substring matching with the universal selector</title>
 5   <link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com">
 6   <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#attribute-selectors">
 7   <meta name="flags" content="">
 8   <meta name="assert" content="Browsers should apply each rule to the elements which have an hyphen-separated list of attribute values">
 9 <style type="text/css">
10 [id|="foo"] {color: purple}
11 [class|="foo"] {color: black}
12 *[lang|="en"] {color: blue}
13 
14 </style>
15  </head>
16  <body>
17 <p id="foo-moo">This text should be purple.</p>
18 <div class="foo-moo-too">This text should be black.</div>
19 <h4 lang="en-us">This text should be blue.</h4>
20  </body>
21 </html>