diff --git a/src/render.ts b/src/render.ts index 06259a6f..00116fe6 100644 --- a/src/render.ts +++ b/src/render.ts @@ -191,7 +191,9 @@ export function updateBounds(s: State): void { s.dom.bounds.clear(); s.addDimensionsCssVarsTo?.style.setProperty('--cg-width', width + 'px'); + s.addDimensionsCssVarsTo?.style.setProperty('---cg-width', width + 'px'); s.addDimensionsCssVarsTo?.style.setProperty('--cg-height', height + 'px'); + s.addDimensionsCssVarsTo?.style.setProperty('---cg-height', height + 'px'); } const isPieceNode = (el: cg.PieceNode | cg.SquareNode): el is cg.PieceNode => el.tagName === 'PIECE';