summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/CSS2/visuren/anonymous-boxes-001b.xht
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /testing/web-platform/tests/css/CSS2/visuren/anonymous-boxes-001b.xht
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/CSS2/visuren/anonymous-boxes-001b.xht')
-rw-r--r--testing/web-platform/tests/css/CSS2/visuren/anonymous-boxes-001b.xht89
1 files changed, 89 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/CSS2/visuren/anonymous-boxes-001b.xht b/testing/web-platform/tests/css/CSS2/visuren/anonymous-boxes-001b.xht
new file mode 100644
index 0000000000..087a030ff4
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/visuren/anonymous-boxes-001b.xht
@@ -0,0 +1,89 @@
+<!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: Percent height inside anonymous block</title>
+
+ <link rel="author" title="GĂ©rard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-height-property" />
+ <link rel="match" href="anonymous-boxes-001b-ref.xht" />
+
+ <meta content="ahem" name="flags" />
+ <meta content="Anonymous block boxes are ignored when resolving percentage values that would refer to it: the closest non-anonymous ancestor box is used instead." name="assert" />
+
+ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+ <style type="text/css"><![CDATA[
+ body
+ {
+ font: 1em/1.25 serif;
+ margin: 8px;
+ }
+
+ p {margin: 1em 0;}
+
+ strong {line-height: 1;}
+
+ div#overlapped-red
+ {
+ background-color: red;
+ height: 100px;
+ left: 8px;
+ position: absolute;
+ top: 122px;
+ /*
+ 16px : max(body's margin-top, p's margin-top)
+ +
+ 20px : p's 1st line box height
+ +
+ 20px : p's 2nd line box height
+ +
+ 16px : p's margin-bottom
+ +
+ 50px : div#closest-non-anonymous-ancestor line box height
+ -----------------------------------------------------------
+ 122px
+ */
+ right: 8px;
+ z-index: -1;
+ }
+
+ div#closest-non-anonymous-ancestor
+ {
+ color: white;
+ font: 2.5em/1.25 Ahem; /* equivalent to 40px/50px in absolute units */
+ height: 200px;
+ }
+
+ div#child-of-anonymous-block-box
+ {
+ background-color: green;
+ height: 50%;
+ }
+ ]]></style>
+
+ </head>
+
+ <body>
+
+ <p>Test passes if there is a filled green<br />
+ rectangle across the page and <strong>no red</strong>.</p>
+
+ <div id="overlapped-red"></div>
+
+ <div id="closest-non-anonymous-ancestor">Some <div id="child-of-anonymous-block-box"></div> text
+ <p>More text</p>
+ </div>
+
+ <!--
+ For example, if the child of the anonymous block box inside the DIV
+ above needs to know the height of its containing block to resolve a
+ percentage height, then it will use the height of the containing
+ block formed by the DIV, not of the anonymous block box.
+ -->
+
+ </body>
+</html> \ No newline at end of file