regression breaking colors in canvas-based widgets

This commit is contained in:
jean-emmanuel 2021-10-03 22:01:17 +02:00
parent 4dc6b46145
commit c90fec4285
2 changed files with 3 additions and 2 deletions

View file

@ -112,7 +112,7 @@ class Canvas extends Widget {
var val = style.getPropertyValue(data.css).trim()
if (typeof val === 'string' && val.includes('(')) {
if (typeof val === 'string' && val.match(/(var|calc)\(/)) {
// property not computed because of calc() or var() in user style
// -> attempt to force calculation
var dummy = html`<div style="position:absolute;width:var(${data.css})"></div>`