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.

experimental: return empty values for hidden keyword properties (#3879)

Jaya Krishna Namburu679b98d4ef3e
diff --git a/packages/css-engine/src/core/to-value.ts b/packages/css-engine/src/core/to-value.ts
index bbc60c71a0..10f4d2aa92 100644
--- a/packages/css-engine/src/core/to-value.ts
+++ b/packages/css-engine/src/core/to-value.ts
@@ -55,6 +55,15 @@ export const toValue = (
}
if (value.type === "keyword") {
+ // The hidden property is used to hide values in the builder
+ // But we can't use none here like its done for image.
+ // As none is not valid in all cases.
+ // Eg: backface-visibility
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/backface-visibility#syntax
+ if (value.hidden === true) {
+ return "";
+ }
+
return value.value;
}