summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/CSS2/visuren/top-115.xht
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/CSS2/visuren/top-115.xht
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/CSS2/visuren/top-115.xht')
-rw-r--r--testing/web-platform/tests/css/CSS2/visuren/top-115.xht66
1 files changed, 66 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/CSS2/visuren/top-115.xht b/testing/web-platform/tests/css/CSS2/visuren/top-115.xht
new file mode 100644
index 0000000000..471b909d26
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/visuren/top-115.xht
@@ -0,0 +1,66 @@
+<!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: position relative - top offset percentage and auto-height containing block</title>
+
+ <link rel="author" title="GĂ©rard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+ <link rel="help" title="9.3.2 Box offsets: 'top', 'right', 'bottom', 'left'" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+ <link rel="help" title="10.5 Content height: the 'height' property" href="http://www.w3.org/TR/CSS21/visudet.html#the-height-property" />
+ <link rel="match" href="top-115-ref.xht" />
+
+ <meta content="'top: [percentage]' for a relatively positioned box refers to height of its containing block. If the height of the containing block is not specified explicitly (i.e., it depends on content height), and this element is not absolutely positioned, then the percentage height value computes to 'auto'." name="assert" />
+
+ <style type="text/css"><![CDATA[
+ div
+ {
+ height: 100px;
+ left: auto;
+ position: relative;
+ width: 100px;
+ }
+
+ #rel-pos-overlapped-red
+ {
+ background-color: red;
+ color: white;
+ top: 50%;
+ }
+
+ #rel-pos-overlapping-green
+ {
+ background-color: green;
+ top: -100px;
+ }
+ ]]></style>
+
+ </head>
+
+ <body>
+
+ <p>Test passes if there is a filled green square and if there is <strong>no red</strong> in this page, <strong>even at its bottom</strong>.</p>
+
+ <div id="rel-pos-overlapped-red">Test FAILED</div>
+
+ <div id="rel-pos-overlapping-green"></div>
+
+ <p>&nbsp;</p>
+
+ <p>&nbsp;</p>
+
+ <p>&nbsp;</p>
+
+ <p>&nbsp;</p>
+
+ <p>&nbsp;</p>
+
+ <p>&nbsp;</p>
+
+ <p>&nbsp;</p>
+
+ <p>&nbsp;</p>
+
+ </body>
+</html> \ No newline at end of file