tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

gradient-longer-hue-hsl-006.html (1038B)


      1 <!DOCTYPE html>
      2 <html lang="en">
      3 <meta charset="utf-8">
      4 <title>Gradient using "longer hue"</title>
      5 <link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com">
      6 <link rel="help" href="https://www.w3.org/TR/css-color-4/#interpolation">
      7 <link rel="match" href="gradient-longer-hue-hsl-006-ref.html">
      8 <meta name="assert" content="Tests that gradient with 'longer hue' renders correctly">
      9 
     10 <style>
     11 div {
     12  margin: 20px 0px 20px 50px;
     13  height: 40px;
     14  width: 100px;
     15  position: relative;
     16  background: linear-gradient(to right in hsl longer hue,
     17                              red var(--from),
     18                              blue var(--to));
     19 }
     20 
     21 .swatch {
     22  --from: 50px;
     23  --to: 100px;
     24 }
     25 
     26 .swatch::before {
     27  content: '\feff';
     28  position: absolute;
     29  bottom: 40px;
     30  height: 10px;
     31  left: calc(var(--from) - 0.5px);
     32  border: 0.5px solid red;
     33 }
     34 
     35 .swatch::after {
     36  content: '\feff';
     37  position: absolute;
     38  top: 40px;
     39  height: 10px;
     40  left: calc(var(--to) - 0.5px);
     41  border: 0.5px solid blue;
     42 }
     43 </style>
     44 
     45 <div class="swatch"></div>