gradient-analogous-missing-components-002-ref.html (1299B)
1 <!doctype html> 2 <html lang="en"> 3 <head> 4 <meta charset="utf-8"> 5 <title>Gradient analogous missing components carry forward logic tests</title> 6 <link rel="author" title="CGQAQ" href="mailto:m.jason.liu@gmail.com"> 7 <link rel="author" title="一丝" href="mailto:yiorsi@gmail.com"> 8 <style> 9 .test { 10 margin: 10px 50px; 11 width: 200px; 12 height: 50px; 13 border: 1px solid black; 14 --color: lime; 15 } 16 17 .test1 { 18 background: linear-gradient(to right, var(--color)); 19 } 20 .test2 { 21 background: linear-gradient(to right in srgb, var(--color)); 22 } 23 .test3 { 24 background: linear-gradient(to right in oklab, var(--color)); 25 } 26 .test4 { 27 background: linear-gradient(to right in display-p3, var(--color)); 28 } 29 </style> 30 </head> 31 <body> 32 <p>They should be equivalent to `background: color-mix(in srgb, color(srgb none 1 none), lime)`</p> 33 <div class="test test1">This should be a lime background.</div> 34 <div class="test test2">This should be a lime background.</div> 35 <div class="test test3">This should be a lime background.</div> 36 <div class="test test4">This should be a lime background.</div> 37 </body> 38 </html>