From 28873972efca497cc2d5cbe6d70af902252de449 Mon Sep 17 00:00:00 2001 From: John Factotum <50942278+johnfactotum@users.noreply.github.com> Date: Fri, 13 Oct 2023 17:42:04 +0800 Subject: [PATCH] Make highlight opacity and blend mode configurable --- overlayer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/overlayer.js b/overlayer.js index c0ba20b..880b906 100644 --- a/overlayer.js +++ b/overlayer.js @@ -127,7 +127,8 @@ export class Overlayer { const { color = 'red' } = options const g = createSVGElement('g') g.setAttribute('fill', color) - g.setAttribute('fill-opacity', .3) + g.style.opacity = `var(--overlayer-highlight-opacity, .3)` + g.style.mixBlendMode = `var(--overlayer-highlight-blend-mode, normal)` for (const { left, top, height, width } of rects) { const el = createSVGElement('rect') el.setAttribute('x', left)