shape-outside-linear-gradient-003.html (1777B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Test: Right float with linear gradient</title> 5 <link rel="author" title="Bear Travis" href="mailto:betravis@adobe.com"/> 6 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shapes-from-image"/> 7 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-property"/> 8 <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-margin-property"/> 9 <link rel="match" href="reference/shape-outside-linear-gradient-002-ref.html"/> 10 <meta name="flags" content="ahem"/> 11 <meta name="assert" content="This test verifies that shape-outside respects a 12 simple linear gradient on a right float with 13 shape-margin applied."/> 14 <meta name="fuzzy" content="maxDifference=0-1; totalPixels=0-8700"/> 15 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 16 <style type="text/css"> 17 .container { 18 width: 200px; 19 height: 200px; 20 background-color: red; 21 font-family: Ahem; 22 font-size: 50px; 23 line-height: 1; 24 } 25 #test { 26 color: green; 27 } 28 #gradient { 29 float: right; 30 width: 200px; 31 height: 200px; 32 background: linear-gradient(to left, green 50%, transparent 50%); 33 shape-outside: linear-gradient(to left, rgba(51, 51, 51, 1) 0%, rgba(51, 51, 51, 0.75) 40%, transparent 40%); 34 shape-margin: 20px; 35 } 36 </style> 37 </head> 38 <body> 39 <p> 40 The test passes if you see a green square. There should be no red. 41 </p> 42 <div id="test" class="container"> 43 <div id="gradient"></div> 44 xx xx xx xx 45 </div> 46 </body> 47 </html>