Skip to content

Commit

Permalink
Merge pull request #299 from lichess-org/schlawg-patch-1
Browse files Browse the repository at this point in the history
export same width & height variables as aliases with three hyphens
  • Loading branch information
niklasf committed Apr 18, 2024
2 parents 3000cb4 + 23b22c5 commit 59bf395
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 59bf395

Please sign in to comment.