3daa63c497a50e7784a8bed333fa91e82fd0e8a3
[WebKit-https.git] / LayoutTests / imported / w3c / web-platform-tests / css / css-shapes / shape-outside / shape-image / gradients / shape-outside-linear-gradient-011.html
1 <!DOCTYPE html>
2 <html>
3   <head>
4     <title>CSS Test: Test float with linear gradient under writing-mode: vertical-rl</title>
5     <link rel="author" title="Brad Werth" href="mailto:bwerth@mozilla.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="help" href="http://www.w3.org/TR/css-shapes-1/#shape-margin"/>
10     <link rel="match" href="reference/shape-outside-linear-gradient-001-ref.html"/>
11     <meta name="flags" content="ahem"/>
12     <meta name="assert" content="This test verifies that shape-outside respects a simple linear gradient with shape-margin under vertical-rl."/>
13     <style type="text/css">
14     .container {
15       writing-mode: vertical-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 25%, transparent 25%);
34       shape-margin: 25%;
35     }
36     #float-right {
37       /* Note: In .container's writing-mode, "float: right" actually floats
38          us towards the bottom. */
39       float: right;
40       inline-size: 100px;
41       block-size: 200px;
42       background: linear-gradient(to top, green 50%, transparent 50%);
43       shape-outside: linear-gradient(to top, green 5%, transparent 5%);
44       shape-margin: 45%
45     }
46     </style>
47   </head>
48   <body>
49     <p>
50       The test passes if you see a green square. There should be no red.
51     </p>
52     <div id="test" class="container">
53       <div id="float-left"></div>
54       x x x x
55     </div>
56     <div id="test" class="container" style="direction: rtl;">
57       <div id="float-right"></div>
58       x x x x
59     </div>
60   </body>
61 </html>