summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/CSS2/fonts/font-size-124.xht
blob: 0954e2a7a3fc53b373561e3294d10fc3eb535748 (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.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

 <head>

  <title>CSS Test: inheritance of computed font-size across fonts</title>

  <!--
  Inspired by
  http://test.csswg.org/suites/css2.1/20110323/html4/background-position-001.htm
  http://test.csswg.org/suites/css2.1/nightly-unstable/html4/background-position-001.htm
  -->

  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
  <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#length-units" />
  <link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#font-size-props" />
  <link rel="match" href="../reference/ref-filled-green-100px-square.xht" />

  <meta content="ahem" name="flags" />
  <meta content="ex unit is the 'x-height' of the relevant font. 'em' and 'ex' length values when defining 'font-size' property refer to the computed font size of the parent element." name="assert" />

  <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
  <style type="text/css"><![CDATA[
  div#overlapped-red
  {
  background-color: red;
  height: 100px;
  width: 100px;
  }

  div#grand-parent {font: 25px/1 Ahem;}
  /*
  To download Ahem font:
  http://www.w3.org/Style/CSS/Test/Fonts/Ahem/
  */

  div#parent {font-size: 5ex;}
  /* The Ahem font has an x-height of 0.8em. */

  div#overlapping-green
  {
  background-color: green;
  bottom: 100px;
  font-family: serif;
  position: relative;
  width: 100px;
  }

  /*
  In this test, the inherited computed font-size of
  div#overlapping-green should be 100px with a line box
  height of 100px.
  */
  ]]></style>

 </head>

 <body>

  <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>

  <div id="overlapped-red"></div>

  <div id="grand-parent">
  		<div id="parent">
  			<div id="overlapping-green">&nbsp;</div>
		</div>
  </div>

 </body>
</html>