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
enable non-px values
Oleg Isonen96261c954e14
diff --git a/app/designer/style-panel/lib/spacing-widget.tsx b/app/designer/style-panel/lib/spacing-widget.tsxindex fb99436f4c..a5b7c20d24 100644--- a/app/designer/style-panel/lib/spacing-widget.tsx+++ b/app/designer/style-panel/lib/spacing-widget.tsx@@ -99,16 +99,6 @@ const styles = {},};-const cleanValueForCSS = (value: string) => {- const isNum = /^\d+$/.test(value);- const isOnlyText = /^[A-Za-z]+$/.test(value);-- if (isNum) return `${value.toString()}px`;- if (isOnlyText) return "0px";-- return value;-};-type SpacingWidgetProps = {setProperty: SetProperty;values: SpacingStyles;@@ -125,7 +115,7 @@ export const SpacingWidget = ({ setProperty, values }: SpacingWidgetProps) => {value: string;property: StyleProperty;}) => {- setProperty(property)(cleanValueForCSS(value));+ setProperty(property)(value);};return (