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.

Update style source sizes, make it more compact (#1979)

Oleg Isonen4970f191e845
diff --git a/apps/builder/app/builder/features/style-panel/style-source/style-source-input.tsx b/apps/builder/app/builder/features/style-panel/style-source/style-source-input.tsx
index dcfc2d26f8..a4c91c1c55 100644
--- a/apps/builder/app/builder/features/style-panel/style-source/style-source-input.tsx
+++ b/apps/builder/app/builder/features/style-panel/style-source/style-source-input.tsx
@@ -73,7 +73,6 @@ const TextFieldContainer = styled("div", {
gap: theme.spacing[3],
p: theme.spacing[3],
borderRadius: theme.borderRadius[4],
- minHeight: theme.spacing[12],
minWidth: 0,
border: `1px solid ${theme.colors.borderMain}`,
"&:focus-within": {
diff --git a/apps/builder/app/builder/features/style-panel/style-source/style-source.tsx b/apps/builder/app/builder/features/style-panel/style-source/style-source.tsx
index 7ae8bcb634..42c77c4086 100644
--- a/apps/builder/app/builder/features/style-panel/style-source/style-source.tsx
+++ b/apps/builder/app/builder/features/style-panel/style-source/style-source.tsx
@@ -128,6 +128,7 @@ const EditableText = ({
<Text
truncate
ref={ref}
+ spellCheck={false}
css={{
outline: "none",
textOverflow: isEditing ? "clip" : "ellipsis",
@@ -194,7 +195,6 @@ const StyleSourceButton = styled("button", {
display: "block",
boxSizing: "border-box",
maxWidth: "100%",
- padding: theme.spacing[3],
variants: {
isEditing: {
true: {
@@ -207,7 +207,7 @@ const StyleSourceButton = styled("button", {
});
const StyleSourceState = styled(Text, {
- padding: theme.spacing[4],
+ padding: theme.spacing[3],
backgroundColor: theme.colors.backgroundStyleSourceToken,
borderTopRightRadius: theme.borderRadius[3],
borderBottomRightRadius: theme.borderRadius[3],
@@ -256,7 +256,7 @@ export const StyleSource = ({
aria-current={selected && state === undefined}
role="button"
>
- <Flex css={{ flexGrow: 1, padding: theme.spacing[2] }}>
+ <Flex css={{ flexGrow: 1, py: theme.spacing[2], px: theme.spacing[3] }}>
<StyleSourceButton
disabled={disabled || isEditing}
isEditing={isEditing}
@@ -272,7 +272,9 @@ export const StyleSource = ({
</StyleSourceButton>
</Flex>
{stateLabel !== undefined && (
- <StyleSourceState>{stateLabel}</StyleSourceState>
+ <StyleSourceState css={{ lineHeight: 1 }}>
+ {stateLabel}
+ </StyleSourceState>
)}
{showMenu && <Menu>{menuItems}</Menu>}
</StyleSourceContainer>