@mocanvas/editor · function
declare function getCameraCssVars(zoom: number): CSSPropertiesThe camera, as custom properties.
Separate from the colours because these change on every zoom rather than on
a theme swap, and because they are the two variables an app most often needs
in CSS: anything drawn in the DOM over a zooming canvas has to divide by the
zoom to keep a constant on-screen size. @mocanvas/compat maps tldraw's
--tl-zoom and --tl-scale onto them; without them every calc() in a
migrated stylesheet resolved to nothing and took its whole declaration with
it.
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.