Merge pull request #1798 from junqwoopark/bug/1797_fix_export_background_color
fix(export): Remove redundant hsl() from background color
This commit is contained in:
@@ -50,7 +50,7 @@
|
|||||||
svg = getSvgElement();
|
svg = getSvgElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
svg.style.backgroundColor = `hsl(${window.getComputedStyle(document.body).getPropertyValue('--background')})`;
|
svg.style.backgroundColor = window.getComputedStyle(document.body).getPropertyValue('--background');
|
||||||
|
|
||||||
const svgString = svg.outerHTML
|
const svgString = svg.outerHTML
|
||||||
.replaceAll('<br>', '<br/>')
|
.replaceAll('<br>', '<br/>')
|
||||||
@@ -100,7 +100,7 @@ ${svgString}`);
|
|||||||
throw new Error('context not found');
|
throw new Error('context not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
context.fillStyle = `hsl(${window.getComputedStyle(document.body).getPropertyValue('--background')})`;
|
context.fillStyle = window.getComputedStyle(document.body).getPropertyValue('--background');
|
||||||
context.fillRect(0, 0, canvas.width, canvas.height);
|
context.fillRect(0, 0, canvas.width, canvas.height);
|
||||||
|
|
||||||
const image = new Image();
|
const image = new Image();
|
||||||
|
|||||||
Reference in New Issue
Block a user