summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-shapes/spec-examples/shape-outside-008.html
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/css-shapes/spec-examples/shape-outside-008.html
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/css-shapes/spec-examples/shape-outside-008.html')
-rw-r--r--testing/web-platform/tests/css/css-shapes/spec-examples/shape-outside-008.html121
1 files changed, 121 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-shapes/spec-examples/shape-outside-008.html b/testing/web-platform/tests/css/css-shapes/spec-examples/shape-outside-008.html
new file mode 100644
index 0000000000..744022801a
--- /dev/null
+++ b/testing/web-platform/tests/css/css-shapes/spec-examples/shape-outside-008.html
@@ -0,0 +1,121 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>CSS Test: Shape smaller than float content area - 2 floats</title>
+ <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"/>
+ <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#relation-to-box-model-and-float-behavior"/>
+ <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#supported-basic-shapes"/>
+ <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-property"/>
+ <link rel="match" href="reference/shape-outside-008-ref.html"/>
+ <meta name="flags" content="ahem"/>
+ <meta name="assert" content="This test verifies that inline content only wraps around the
+ shapes, and otherwise overlays the rest of the float margin
+ boxes when two floats are stacked next to each other."/>
+ <!-- This test is derived from Example 5 in this version of the spec:
+ http://www.w3.org/TR/2013/WD-css-shapes-1-20131203/ -->
+ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+ <style type="text/css">
+ .container {
+ width: 260px;
+ font-family: Ahem;
+ font-size: 15px;
+ line-height: 2em;
+ border: 1px solid black;
+ padding-left: 2px;
+ }
+ #test {
+ color: green;
+ }
+ .test-float-left {
+ shape-outside: polygon(0 70px, 50px 120px, 0 120px);
+ float: left;
+ width: 100px;
+ height: 100px;
+ margin-top: 20px;
+ }
+ #test, #failure-container {
+ position: absolute;
+ top: 70px;
+ }
+ #margin-line {
+ position: absolute;
+ top: 100px;
+ width: 263px;
+ border-bottom: 1px solid black;
+ }
+ .fail {
+ position: absolute;
+ height: 15px;
+ background-color: red;
+ z-index: -1;
+ }
+ #bar-1 {
+ top: 8px;
+ left: 3px;
+ width: 255px;
+ }
+ #bar-2 {
+ top: 38px;
+ left: 3px;
+ width: 255px;
+ }
+ #bar-3 {
+ top: 68px;
+ left: 23px;
+ width: 225px;
+ }
+ #bar-4 {
+ top: 98px;
+ left: 123px;
+ width: 135px;
+ }
+ #bar-5 {
+ top: 128px;
+ left: 153px;
+ width: 105px;
+ }
+ .triangle {
+ position: absolute;
+ width: 100px;
+ height: 100px;
+ background-color: lightblue;
+ clip-path: polygon(0% 50%, 50% 100%, 0 100%);;
+
+ }
+ #triangle-1 {
+ top: 90px;
+ margin-left: 2px;
+ }
+ #triangle-2 {
+ top: 120px;
+ margin-left: 102px;
+ }
+ </style>
+ </head>
+ <body>
+ <p>
+ The test passes if one green bar is inside the top rectangle, four green bars
+ are in the bottom rectangle, and none intersect the triangles. There should be no
+ red.
+ </p>
+ <div id="test" class="container">
+ <div class="test-float-left"></div>
+ XXXXXXXXXXXXXXXXX
+ <div class="test-float-left"></div>
+ XXXXXXXXXXXXXXXXX
+ XXXXXXXXXXXXXXX
+ XXXXXXXXX
+ XXXXXXX
+ </div>
+ <div id="margin-line"></div>
+ <div id="failure-container">
+ <div id="bar-1" class="fail"></div>
+ <div id="bar-2" class="fail"></div>
+ <div id="bar-3" class="fail"></div>
+ <div id="bar-4" class="fail"></div>
+ <div id="bar-5" class="fail"></div>
+ </div>
+ <div id="triangle-1" class="triangle"></div>
+ <div id="triangle-2" class="triangle"></div>
+ </body>
+ </html>