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.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
fix placement color & add an outline to it
Roman Pominov9e1db8ea18af
diff --git a/apps/designer/app/designer/shared/tree/placement-indicator.tsx b/apps/designer/app/designer/shared/tree/placement-indicator.tsxindex cc3300b0a2..ba9e5f54b3 100644--- a/apps/designer/app/designer/shared/tree/placement-indicator.tsx+++ b/apps/designer/app/designer/shared/tree/placement-indicator.tsx@@ -2,20 +2,29 @@ import { Box, Placement, Rect, styled } from "@webstudio-is/design-system";const CIRCLE_SIZE = 8;const LINE_THICKNESS = 2;+const OUTLINE_WIDTH = 1;// overlap the line with the circle by this much// to make sure they are connectedconst OVERLAP = 1;+const CircleOutline = styled(Box, {+ width: CIRCLE_SIZE + OUTLINE_WIDTH * 2,+ height: CIRCLE_SIZE + OUTLINE_WIDTH * 2,+ position: "absolute",+ borderRadius: "50%",+ pointerEvents: "none",+ bc: "$loContrast",+});+const Circle = styled(Box, {width: CIRCLE_SIZE,height: CIRCLE_SIZE,- top: (LINE_THICKNESS - CIRCLE_SIZE) / 2,- left: OVERLAP - CIRCLE_SIZE,position: "absolute",border: "solid $dropPlacement",borderWidth: "$2",borderRadius: "50%",+ pointerEvents: "none",});const Line = styled(Box, {@@ -23,6 +32,8 @@ const Line = styled(Box, {position: "absolute",background: "$dropPlacement",pointerEvents: "none",+ outline: "solid $loContrast",+ outlineWidth: OUTLINE_WIDTH,});export const PlacementIndicatorLine = ({@@ -30,16 +41,28 @@ export const PlacementIndicatorLine = ({}: {placement: Placement;}) => (- <Line- style={{- top: placement.y - LINE_THICKNESS / 2,- left: placement.x + (CIRCLE_SIZE / 2 - OVERLAP),- width: placement.length - (CIRCLE_SIZE / 2 - OVERLAP),- height: LINE_THICKNESS,- }}- >- <Circle />- </Line>+ <>+ <CircleOutline+ style={{+ top: placement.y - CIRCLE_SIZE / 2 - OUTLINE_WIDTH,+ left: placement.x - CIRCLE_SIZE / 2 - OUTLINE_WIDTH,+ }}+ />+ <Line+ style={{+ top: placement.y - LINE_THICKNESS / 2,+ left: placement.x + (CIRCLE_SIZE / 2 - OVERLAP),+ width: placement.length - (CIRCLE_SIZE / 2 - OVERLAP),+ height: LINE_THICKNESS,+ }}+ />+ <Circle+ style={{+ top: placement.y - CIRCLE_SIZE / 2,+ left: placement.x - CIRCLE_SIZE / 2,+ }}+ />+ </>);const Outline = styled(Box, {diff --git a/packages/design-system/src/stitches.config.ts b/packages/design-system/src/stitches.config.tsindex 3e626f8cc2..b6f49c5510 100644--- a/packages/design-system/src/stitches.config.ts+++ b/packages/design-system/src/stitches.config.ts@@ -204,7 +204,7 @@ export const {shadowDark: "hsl(206 22% 7% / 20%)",background: "$slate1",text: "$slate12",- dropPlacement: "#f531b3",+ dropPlacement: "$blue9",},fonts: {sans: "Inter, -apple-system, system-ui, sans-serif",@@ -479,6 +479,6 @@ export const darkTheme = createTheme({background: "$slate12",text: "$slate1",- dropPlacement: "#f531b3",+ dropPlacement: "$blue9",},});