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 showing unit-less dash for properties. that support it

Sultanb86f563d1ad5
diff --git a/apps/designer/app/designer/features/style-panel/shared/css-value-input/unit-select.tsx b/apps/designer/app/designer/features/style-panel/shared/css-value-input/unit-select.tsx
index e6f9cc7b6e..ecaf1f7d1d 100644
--- a/apps/designer/app/designer/features/style-panel/shared/css-value-input/unit-select.tsx
+++ b/apps/designer/app/designer/features/style-panel/shared/css-value-input/unit-select.tsx
@@ -50,7 +50,10 @@ export const useUnitSelect = ({
() =>
units
.filter((unit) => {
- return isValid(property, value?.value + String(unit));
+ return isValid(
+ property,
+ value?.value + String(unit).replace("number", "")
+ );
})
.map((unit) => unitRenderMap.get(unit) ?? unit),
[units]