Re-import the css/css-shapes WPT
[WebKit-https.git] / LayoutTests / imported / w3c / web-platform-tests / css / css-shapes / shape-outside / shape-image / gradients / shape-outside-linear-gradient-007.html
1 <!DOCTYPE html>
2 <html>
3   <head>
4     <title>CSS Test: Test float with linear gradient under writing-mode: sideways-rl</title>
5     <link rel="author" title="Ting-Yu Lin" href="mailto:aethanyc@gmail.com"/>
6     <link rel="author" title="Mozilla" href="http://www.mozilla.org/">
7     <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shapes-from-image"/>
8     <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-property"/>
9     <link rel="match" href="reference/shape-outside-linear-gradient-001-ref.html"/>
10     <meta name="flags" content="ahem"/>
11     <meta name="assert" content="This test verifies that shape-outside respects a simple linear gradient under sideways-rl."/>
12     <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
13     <style type="text/css">
14     .container {
15       writing-mode: sideways-rl;
16       inline-size: 100px;
17       block-size: 200px;
18       background-color: red;
19       font-family: Ahem;
20       font-size: 50px;
21       line-height: 1;
22     }
23     #test {
24       color: green;
25     }
26     #float-left {
27       /* Note: In .container's writing-mode, "float: left" actually floats
28          us towards the top. */
29       float: left;
30       inline-size: 100px;
31       block-size: 200px;
32       background: linear-gradient(to bottom, green 50%, transparent 50%);
33       shape-outside: linear-gradient(to bottom, green 50%, transparent 50%);
34     }
35     #float-right {
36       /* Note: In .container's writing-mode, "float: right" actually floats
37          us towards the bottom. */
38       float: right;
39       inline-size: 100px;
40       block-size: 200px;
41       background: linear-gradient(to top, green 50%, transparent 50%);
42       shape-outside: linear-gradient(to top, green 50%, transparent 50%);
43     }
44     </style>
45   </head>
46   <body>
47     <p>
48       The test passes if you see a green square. There should be no red.
49     </p>
50     <div id="test" class="container">
51       <div id="float-left"></div>
52       x x x x
53     </div>
54     <div id="test" class="container" style="direction: rtl;">
55       <div id="float-right"></div>
56       x x x x
57     </div>
58   </body>
59 </html>