summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/CSS2/margin-padding-clear/margin-collapse-038.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/margin-padding-clear/margin-collapse-038.xht
parentInitial commit. (diff)
downloadfirefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz
firefox-43a97878ce14b72f0981164f87f2e35e14151312.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/margin-padding-clear/margin-collapse-038.xht')
-rw-r--r--testing/web-platform/tests/css/CSS2/margin-padding-clear/margin-collapse-038.xht73
1 files changed, 73 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/CSS2/margin-padding-clear/margin-collapse-038.xht b/testing/web-platform/tests/css/CSS2/margin-padding-clear/margin-collapse-038.xht
new file mode 100644
index 0000000000..ada2e31cf7
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/margin-padding-clear/margin-collapse-038.xht
@@ -0,0 +1,73 @@
+<!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: Collapsing margins - margin-bottom of the last in-flow child block collapsing with its max-height parent block's bottom margin</title>
+
+ <link rel="author" title="GĂ©rard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+ <link rel="author" title="Bruno Fassino" href="http://www.brunildo.org/" />
+ <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#collapsing-margins" />
+ <link rel="match" href="margin-collapse-038-ref.xht" />
+
+ <meta content="The 'max-height' of a parent block element should have no influence over whether such parent block element's bottom margin is adjoining to its last child's bottom margin. In such situation, the bottom margin of the parent block element and the bottom margin of its last child should collapse as long as such parent block element has no bottom padding and has no bottom border." name="assert" />
+
+ <style type="text/css"><![CDATA[
+ body {margin: 8px;}
+
+ p {margin: 8px 0px 0px;}
+
+ div#reference-overlapped-red
+ {
+ background-color: red;
+ height: 200px;
+ left: 8px;
+ position: absolute;
+ right: 8px;
+ z-index: -1;
+ }
+
+ div#green-grand-parent
+ {
+ background-color: green;
+ border-bottom: green solid 1px;
+ }
+
+ div#parent-with-max-height
+ {
+ margin-bottom: 0px;
+ max-height: 99px;
+ }
+
+ div#last-child
+ {
+ height: 300px;
+ /*
+ The height of parent-with-max-height is constrained by
+ its max-height which is smaller than this last-child height
+ */
+ margin-bottom: 100px;
+ }
+ ]]></style>
+
+ </head>
+
+ <body>
+
+ <p>Test passes if there is a tall filled green rectangle across the page and <strong>no red</strong>.</p>
+
+ <div id="reference-overlapped-red"></div>
+
+ <div id="green-grand-parent">
+ <div id="parent-with-max-height">
+ <div id="last-child"></div>
+ </div>
+ </div>
+
+ <!--
+ #last-child's margin-bottom should collapse with #parent-with-max-height's margin-bottom: max(0px, 100px) = 100px
+ -->
+
+ </body>
+</html>