tor-browser

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

background-blend-mode-computed.html (2316B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>Compositing and Blending Level 1: getComputedStyle().backgroundBlendMode</title>
      6 <link rel="help" href="https://drafts.fxtf.org/compositing-1/#propdef-background-blend-mode">
      7 <meta name="assert" content="background-blend-mode computed value is as specified.">
      8 <script src="/resources/testharness.js"></script>
      9 <script src="/resources/testharnessreport.js"></script>
     10 <script src="/css/support/computed-testcommon.js"></script>
     11 </head>
     12 <body>
     13 <div id="target"></div>
     14 <script>
     15 test_computed_value("background-blend-mode", "normal");
     16 test_computed_value("background-blend-mode", "multiply");
     17 test_computed_value("background-blend-mode", "screen");
     18 test_computed_value("background-blend-mode", "overlay");
     19 test_computed_value("background-blend-mode", "darken");
     20 test_computed_value("background-blend-mode", "lighten");
     21 test_computed_value("background-blend-mode", "color-dodge");
     22 test_computed_value("background-blend-mode", "color-burn");
     23 test_computed_value("background-blend-mode", "hard-light");
     24 test_computed_value("background-blend-mode", "soft-light");
     25 test_computed_value("background-blend-mode", "difference");
     26 test_computed_value("background-blend-mode", "exclusion");
     27 test_computed_value("background-blend-mode", "hue");
     28 test_computed_value("background-blend-mode", "saturation");
     29 test_computed_value("background-blend-mode", "color");
     30 test_computed_value("background-blend-mode", "luminosity");
     31 
     32 // Per spec, excess values should not be used,
     33 // BUT the computed style should be similar to the specified values.
     34 // see https://drafts.fxtf.org/compositing-1/#background-blend-mode
     35 // and https://drafts.csswg.org/css-backgrounds-3/#layering
     36 // > The lists are matched up from the first value: excess values at the end are not used.
     37 // but in https://drafts.csswg.org/css-values-4/#linked-properties
     38 // it was decided that
     39 // > The computed values of the coordinating list properties are not affected by such truncation or repetition.
     40 //
     41 // There is a distinction between specified values, used values, and computed values.
     42 
     43 test_computed_value("background-blend-mode", "normal, luminosity");
     44 test_computed_value("background-blend-mode", "screen, overlay");
     45 test_computed_value("background-blend-mode", "color, saturation");
     46 </script>
     47 </body>
     48 </html>