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
feat: make spacing input autogrow (#5052)
Oleg Isonen1d9ae2ad29bf
diff --git a/apps/builder/app/builder/features/style-panel/sections/shared/input-popover.tsx b/apps/builder/app/builder/features/style-panel/sections/shared/input-popover.tsxindex f2a4d7b590..3df535cd5d 100644--- a/apps/builder/app/builder/features/style-panel/sections/shared/input-popover.tsx+++ b/apps/builder/app/builder/features/style-panel/sections/shared/input-popover.tsx@@ -45,11 +45,13 @@ const Input = ({return (<CssValueInput+ minWidth="6ch"styleSource={styleSource}property={property}value={value}intermediateValue={intermediateValue}getOptions={() => $availableUnitVariables.get()}+ fieldSizing="content"onChange={(styleValue) => {setIntermediateValue(styleValue);const activeProperties = getActiveProperties();@@ -176,7 +178,7 @@ export const InputPopover = ({description={propertyDescriptions[property]}properties={[property]}/>- <Flex css={{ width: theme.spacing[20] }}>+ <Flex css={{ maxWidth: theme.spacing[30] }}><InputstyleSource={styleSource}value={value}diff --git a/apps/builder/app/builder/features/style-panel/shared/css-value-input/css-value-input.tsx b/apps/builder/app/builder/features/style-panel/shared/css-value-input/css-value-input.tsxindex 71ffe929a3..39b59c766d 100644--- a/apps/builder/app/builder/features/style-panel/shared/css-value-input/css-value-input.tsx+++ b/apps/builder/app/builder/features/style-panel/shared/css-value-input/css-value-input.tsx@@ -322,6 +322,7 @@ type CssValueInputProps = Pick<unitOptions?: UnitOption[];id?: string;placeholder?: string;+ minWidth?: string;};const initialValue: IntermediateStyleValue = {@@ -399,6 +400,7 @@ export const CssValueInput = ({text,unitOptions,placeholder,+ minWidth = "2ch",...props}: CssValueInputProps) => {const value = props.intermediateValue ?? props.value ?? initialValue;@@ -921,7 +923,7 @@ export const CssValueInput = ({}css={{cursor: "default",- minWidth: "2em",+ minWidth,"&:hover": {[cssButtonDisplay]: "block",},