gradient-eval-004.html (1068B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>Gradient interpolation</title> 5 <meta name="fuzzy" content="maxDifference=1-2;totalPixels=0-2000"> 6 <link rel="author" title="Mike Bremford" href="mailto:mike@bfo.com"> 7 <link rel="author" title="CGQAQ" href="mailto:m.jason.liu@gmail.com"> 8 <link rel="help" href="https://www.w3.org/TR/css-color-4/#interpolation"> 9 <link rel="help" href="https://www.w3.org/TR/css-color-4/#missing"> 10 <meta name="assert" content="Gradient evaluation when one of the components is none works as specified"/> 11 <link rel="match" href="gradient-eval-004-ref.html"> 12 <style> 13 :root { 14 --start: rgb(0% 0% 100%); 15 --end: rgb(0% 0% none); /* none should resolve to 0 as rgb don't have analogous components with oklab */ 16 --t: 0.5; 17 --big: 131070000px; 18 } 19 .test { 20 width: 100px; 21 height: 100px; 22 background: linear-gradient(var(--start) calc(var(--big) * (0 - var(--t))), var(--end) calc(var(--big) * (1 - var(--t)))); 23 } 24 </style> 25 </head> 26 <body> 27 <div class="test"></div> 28 </body> 29 </html>