Status: FAIL | Duration: 14ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-shapes/spec-examples/shape-outside-007.html
<!DOCTYPE html> <html> <head> <title>CSS Test: Shape smaller than float content area - 1 float</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-007-ref.html"/> <meta name="flags" content="ahem"/> <meta name="assert" content="This test verifies that inline content only wraps around the shape, and otherwise overlays the rest of the float margin box"/> <!-- 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: 20px; line-height: 1.5em; 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: 20px; background-color: red; z-index: -1; } #bar-1 { top: 6px; left: 3px; width: 240px; } #bar-2 { top: 36px; left: 3px; width: 240px; } #bar-3 { top: 66px; left: 23px; width: 220px; } #bar-4 { top: 96px; left: 53px; width: 200px; } #triangle { position: absolute; top: 90px; width: 100px; height: 100px; background-color: lightblue; margin-left: 2px; clip-path: polygon(0% 50%, 50% 100%, 0 100%);; } </style> </head> <body> <p> The test passes if one green bar is inside the top rectangle, three green bars are in the bottom rectangle, and none intersect the triangle. There should be no red. </p> <div id="test" class="container"> <div id="test-float-left"></div> XXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXX </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> <div id="triangle"></div> </body> </html>
/css/css-shapes/spec-examples/reference/shape-outside-007-ref.html
<!DOCTYPE html> <html> <head> <title>CSS Reference File</title> <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"/> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <style type="text/css"> #container { position: absolute; top: 70px; width: 260px; height: 120px; font-family: Ahem; font-size: 20px; line-height: 1.5em; border: 1px solid black; padding-left: 2px; } #margin-line { position: absolute; top: 100px; width: 263px; border-bottom: 1px solid black; } .bar { position: absolute; height: 20px; background-color: green; } #bar-1 { top: 5px; width: 240px; } #bar-2 { top: 35px; width: 240px; } #bar-3 { top: 65px; left: 22px; width: 220px; } #bar-4 { top: 95px; left: 52px; width: 200px; } #triangle { position: absolute; top: 90px; width: 100px; height: 100px; background-color: lightblue; margin-left: 2px; clip-path: polygon(0% 50%, 50% 100%, 0 100%);; } </style> </head> <body> <p> The test passes if one green bar is inside the top rectangle, three green bars are in the bottom rectangle, and none intersect the triangle. There should be no red. </p> <div id="container"> <div id="bar-1" class="bar"></div> <div id="bar-2" class="bar"></div> <div id="bar-3" class="bar"></div> <div id="bar-4" class="bar"></div> </div> <div id="margin-line"></div> <div id="triangle"></div> </body> </html>