diff options
Diffstat (limited to 'testing/web-platform/tests/css/CSS2/fonts/font-size-124.xht')
-rw-r--r-- | testing/web-platform/tests/css/CSS2/fonts/font-size-124.xht | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/CSS2/fonts/font-size-124.xht b/testing/web-platform/tests/css/CSS2/fonts/font-size-124.xht new file mode 100644 index 0000000000..0954e2a7a3 --- /dev/null +++ b/testing/web-platform/tests/css/CSS2/fonts/font-size-124.xht @@ -0,0 +1,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"> </div> + </div> + </div> + + </body> +</html>
\ No newline at end of file |