gradient-single-stop-002.html (1121B)
1 <!doctype html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="utf-8"> 6 <title>Gradient with a single stop</title> 7 <link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com"> 8 <link rel="help" href="https://drafts.csswg.org/css-images-3/#color-stop-syntax"> 9 <link rel="help" href="https://drafts.csswg.org/css-images-3/#coloring-gradient-line"> 10 <meta name="assert" content="Tests that gradient with a single color stop renders the expected solid color"> 11 <meta name="fuzzy" content="maxDifference=0-1; totalPixels=0-6000"> 12 <link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html"> 13 <style> 14 body { 15 background: #fff; 16 } 17 18 div { 19 width: 100px; 20 height: 100px; 21 position: absolute; 22 } 23 24 #fail { 25 background: red; 26 } 27 28 #test { 29 background-image: linear-gradient(to right, green 90%); 30 } 31 </style> 32 </head> 33 34 <body> 35 <p>Test passes if there is a filled green square.</p> 36 <div id="fail"></div> 37 <div id="test"></div> 38 </body> 39 </html>