@mocanvas/editor · constant

CANVAS_THEME_VARS

declare const CANVAS_THEME_VARS: {
    readonly "--mocanvas-selection": "selectStroke";
    readonly "--mocanvas-selection-fg": "background";
    readonly "--mocanvas-brush-fill": "selectFill";
    readonly "--mocanvas-brush-stroke": "selectStroke";
    readonly "--mocanvas-snap": "hint";
    readonly "--mocanvas-background": "background";
    readonly "--mocanvas-surface": "solid";
    readonly "--mocanvas-text": "text";
    readonly "--mocanvas-grid": "grid";
}

Which theme colour each custom property carries.

The names are the ones ui.css already declares and Canvas already reads, so an app that themed mocanvas by overriding the variables by hand keeps working: the theme now writes the same variables it used to have to be told.

Mentioned here

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.