diff --git a/apps/designer/app/canvas/shared/styles.ts b/apps/designer/app/canvas/shared/styles.ts index 4e12c31cce..32706d46e4 100644 --- a/apps/designer/app/canvas/shared/styles.ts +++ b/apps/designer/app/canvas/shared/styles.ts @@ -9,6 +9,7 @@ import { toVarNamespace, } from "@webstudio-is/react-sdk"; import { globalCss } from "@webstudio-is/design-system"; +import { useEffect } from "react"; const setCssVar = (id: string, property: string, value?: StyleValue) => { const customProperty = `--${toVarNamespace(id, property)}`; @@ -47,6 +48,15 @@ const usePreviewStyle = () => { }); }; +// Once we rendered the tree in editing mode, we have rendered all styles in a