mix-blend-mode-plus-lighter.html (1074B)
1 <!DOCTYPE html> 2 <title>mix-blend-mode: plus-lighter test</title> 3 <link rel="author" title="Jake Archibald" href="mailto:jakearchibald@chromium.org"> 4 <link rel="help" href="https://drafts.fxtf.org/compositing-2/#mix-blend-mode"> 5 <link rel="match" href="reference/mix-blend-mode-plus-lighter-ref.html"> 6 <meta name="fuzzy" content="maxDifference=0-1;totalPixels=0-4294967295"> 7 <style> 8 .test { 9 width: 100px; 10 height: 100px; 11 position: relative; 12 isolation: isolate; 13 } 14 .layer { 15 position: absolute; 16 inset: 0; 17 mix-blend-mode: plus-lighter; 18 } 19 </style> 20 <script type="module"> 21 import { tests } from '../support/plus-lighter.js'; 22 import { toCSSColor } from '../support/utils.js'; 23 24 function createLayers(colors) { 25 let html = ''; 26 27 for (const color of colors) { 28 html += `<div class="layer" style="background-color: ${toCSSColor(color)}"></div>`; 29 } 30 31 return html; 32 } 33 34 for (const colors of tests) { 35 document.body.insertAdjacentHTML('beforeend', ` 36 <div class="test">${createLayers(colors)}</div> 37 `); 38 } 39 </script>