summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/CSS2/fonts/font-weight-018.xht
blob: 3a2a2f22b4f5ca401b5ffa35a90fffbd8c0e276e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title>CSS Test: CSS: sanity tests for relative keyword values of font-weight</title>
  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/fonts/weight/002.xml" type="application/xhtml+xml"/>
  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/fonts/weight/002.html" type="text/html"/>
  <link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#font-boldness" />
  <link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-weight-prop" />
  <style type="text/css">
   /* Chains should be followed all the way. If a chain causes reentrancy, fail. */
   .fw100 { font-weight: 100; } /* defaults to 200 */
   .fw200 { font-weight: 200; } /* defaults to 100, failing to 300 */
   .fw300 { font-weight: 300; } /* defaults to 200, failing to 400 */
   .fw400 { font-weight: 400; } /* normal */
   .fw500 { font-weight: 500; } /* defaults to 400 */
   .fw600 { font-weight: 600; } /* defaults to 700, failing to 500 */
   .fw700 { font-weight: 700; } /* bold - defaults to 800, failing to 600 */
   .fw800 { font-weight: 800; } /* defaults to 900, failing to 700 */
   .fw900 { font-weight: 900; } /* defaults to 800 */

   /* Test */
   .l { font-weight: lighter; }
   .b { font-weight: bolder; }

   /* prettiness */
   p { margin: 1em 0 0.4em 0; }
   p.w, p.x { font-family: Verdana, sans-serif; font-variant: normal; font-style: normal; font-size: 1em; }
   p.w { margin: 0 0 0.2em 2em; }
   p.x { margin: 0.75em 0 0.2em 2em; }
  </style>
 </head>
 <body>
  <p>The following lines should always be light on the left and bold
  on the right and should all be identical (assuming your font only
  has two font weights).</p>

  <!-- simple -->
  <p class="x fw100">light<span class="b">bold</span></p>
  <p class="w fw200">light<span class="b">bold</span></p>
  <p class="w fw300">light<span class="b">bold</span></p>
  <p class="w fw400">light<span class="b">bold</span></p>
  <p class="w fw500">light<span class="b">bold</span></p>
  <p class="w fw600"><span class="l">light</span>bold</p>
  <p class="w fw700"><span class="l">light</span>bold</p>
  <p class="w fw800"><span class="l">light</span>bold</p>
  <p class="w fw900"><span class="l">light</span>bold</p>

  <!-- two level lighter/bolder -->
  <p class="x fw100"><span class="l">light<span class="b">bold</span></span></p>
  <p class="w fw200"><span class="l">light<span class="b">bold</span></span></p>
  <p class="w fw300"><span class="l">light<span class="b">bold</span></span></p>
  <p class="w fw400"><span class="l">light<span class="b">bold</span></span></p>
  <p class="w fw500"><span class="l">light<span class="b">bold</span></span></p>
  <p class="w fw600"><span class="l">light<span class="b">bold</span></span></p>
  <p class="w fw700"><span class="l">light<span class="b">bold</span></span></p>
  <p class="w fw800"><span class="l">light<span class="b">bold</span></span></p>
  <p class="w fw900"><span class="l">light<span class="b">bold</span></span></p>

  <!-- two level bolder/lighter -->
  <p class="x fw100"><span class="b"><span class="l">light</span>bold</span></p>
  <p class="w fw200"><span class="b"><span class="l">light</span>bold</span></p>
  <p class="w fw300"><span class="b"><span class="l">light</span>bold</span></p>
  <p class="w fw400"><span class="b"><span class="l">light</span>bold</span></p>
  <p class="w fw500"><span class="b"><span class="l">light</span>bold</span></p>
  <p class="w fw600"><span class="b"><span class="l">light</span>bold</span></p>
  <p class="w fw700"><span class="b"><span class="l">light</span>bold</span></p>
  <p class="w fw800"><span class="b"><span class="l">light</span>bold</span></p>
  <p class="w fw900"><span class="b"><span class="l">light</span>bold</span></p>

 </body>
</html>