cascade-precedence-001

cascade mechanism has precedence over inheritance - font boldness

WeasyPrint

This browser

Assertion
When determining the specified value of a property, the cascade mechanism of (user agent, author, user) style sheets has precedence. If no value results from such mechanism, then the property may inherit from its parent. In this testcase, it is presumed that b elements are specified in the user agents style sheets to embold their text content.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3 
 4  <head>
 5 
 6   <title>CSS Test: cascade mechanism has precedence over inheritance - font boldness</title>
 7 
 8   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
 9   <link rel="author" title="James Hopkins" href="james(a)idreamincode.co.uk">
10   <link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#specified-value">
11   <link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#inheritance">
12   <meta content="" name="flags">
13   <meta content="When determining the specified value of a property, the cascade mechanism of (user agent, author, user) style sheets has precedence. If no value results from such mechanism, then the property may inherit from its parent. In this testcase, it is presumed that b elements are specified in the user agents style sheets to embold their text content." name="assert">
14 
15   <style type="text/css">
16   div {font-weight: normal;}
17   </style>
18 
19  </head>
20 
21  <body>
22 
23   <p>Test passes if the sentence below is bold.</p>
24 
25   <div><b>This text should be bold.</b></div>
26 
27  </body>
28 </html>