gradient-single-stop-longer-hue-hsl-002.html (1036B)
1 <!doctype html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="utf-8"> 6 <title>Gradient in HSL space</title> 7 <meta name="fuzzy" content="maxDifference=0-8;totalPixels=0-18000"> 8 <link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com"> 9 <link rel="help" href="https://www.w3.org/TR/css-color-4/#interpolation"> 10 <meta name="assert" content="Tests that a single-stop longer-hue gradient renders a solid color, for various stop positions"> 11 <link rel="match" href="gradient-single-stop-longer-hue-hsl-002-ref.html"> 12 <style> 13 body { 14 background: #fff; 15 } 16 17 div { 18 width: 200px; 19 height: 50px; 20 margin: 10px; 21 background-image: linear-gradient(to right in hsl longer hue, red var(--pos) var(--pos)); 22 } 23 </style> 24 </head> 25 26 <body> 27 <div style="--pos: 0%"></div> 28 <div style="--pos: 25%"></div> 29 <div style="--pos: 50%"></div> 30 <div style="--pos: 75%"></div> 31 <div style="--pos: 100%"></div> 32 </body> 33 </html>