Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix placement a bit

Roman Pominovcc0a41fa749a
diff --git a/apps/designer/app/shared/design-system/components/primitives/dnd/placement.tsx b/apps/designer/app/shared/design-system/components/primitives/dnd/placement.tsx
index 0d8dc7ac6f..5b4ae82a9f 100644
--- a/apps/designer/app/shared/design-system/components/primitives/dnd/placement.tsx
+++ b/apps/designer/app/shared/design-system/components/primitives/dnd/placement.tsx
@@ -207,17 +207,25 @@ export const usePlacement = ({ onPalcementChange }: Parameters): Handlers => {
};
export const PlacementIndicator = ({ rect }: { rect?: Rect }) => {
- if (rect === undefined) return null;
+ if (rect === undefined) {
+ return null;
+ }
+
const style = {
- top: rect.top,
- left: rect.left,
+ top: rect.top - 1,
+ left: rect.left - 1,
width: rect.width,
height: rect.height,
};
+
return (
<Box
style={style}
- css={{ position: "absolute", border: "1px solid green" }}
+ css={{
+ boxSizing: "content-box",
+ position: "absolute",
+ border: "1px solid $grass9",
+ }}
/>
);
};