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: Refix bigger clickable surface for local style source (#4956)

Oleg Isonen4a348ed9c6c0
diff --git a/apps/builder/app/builder/features/style-panel/style-source/style-source-control.tsx b/apps/builder/app/builder/features/style-panel/style-source/style-source-control.tsx
index f854eef89b..7bc5ce2770 100644
--- a/apps/builder/app/builder/features/style-panel/style-source/style-source-control.tsx
+++ b/apps/builder/app/builder/features/style-panel/style-source/style-source-control.tsx
@@ -215,12 +215,6 @@ const StyleSourceButton = styled("button", {
},
false: {},
},
- bleed: {
- true: {
- position: "absolute",
- inset: 0,
- },
- },
},
});
@@ -332,25 +326,28 @@ export const StyleSourceControl = ({
isEditing={isEditing}
tabIndex={-1}
onClick={onSelect}
- bleed={source === "local"}
>
- <Flex align="center" justify="center" gap="1">
- {source === "local" ? (
+ {source === "local" ? (
+ <Flex justify="center" align="center">
+ <Box
+ // We need this so that the small local button has a bigger clickable surface
+ css={{ position: "absolute", inset: 0 }}
+ />
<LocalStyleIcon showDot={hasStyles} />
- ) : (
- <>
- <EditableText
- isEditing={isEditing}
- onChangeEditing={onChangeEditing}
- onChangeValue={onChangeValue}
- value={label}
- />
- {hasStyles === false && isEditing === false && (
- <LocalStyleIcon showDot={hasStyles} />
- )}
- </>
- )}
- </Flex>
+ </Flex>
+ ) : (
+ <Flex align="center" justify="center" gap="1">
+ <EditableText
+ isEditing={isEditing}
+ onChangeEditing={onChangeEditing}
+ onChangeValue={onChangeValue}
+ value={label}
+ />
+ {hasStyles === false && isEditing === false && (
+ <LocalStyleIcon showDot={hasStyles} />
+ )}
+ </Flex>
+ )}
</StyleSourceButton>
</Flex>
{stateLabel !== undefined && (