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
ensure min height directly on the empty element, which automatically goes away once there is a node inside
Oleg Isonencc15654f2ed4
diff --git a/app/canvas/features/wrapper-component/use-css.tsx b/app/canvas/features/wrapper-component/use-css.tsxindex 4e664fc23a..cf48cc81e4 100644--- a/app/canvas/features/wrapper-component/use-css.tsx+++ b/app/canvas/features/wrapper-component/use-css.tsx@@ -50,6 +50,8 @@ const emptyStyle = {"&:empty": {outline: "1px dashed #555",outlineOffset: -1,+ paddingTop: "$8",+ paddingRight: "$8",},};diff --git a/app/shared/canvas-components/primitives/box.tsx b/app/shared/canvas-components/primitives/box.tsxindex 84a531834f..70246d083c 100644--- a/app/shared/canvas-components/primitives/box.tsx+++ b/app/shared/canvas-components/primitives/box.tsx@@ -3,11 +3,6 @@ export { SquareIcon as Icon } from "~/shared/icons";// Webstudio specific default styles for the node type.export const defaultStyle: Style = {- minHeight: {- type: "unit",- unit: "px",- value: 100,- },boxSizing: {type: "keyword",value: "border-box",diff --git a/app/shared/canvas-components/primitives/heading.tsx b/app/shared/canvas-components/primitives/heading.tsxindex c3adb29350..4fd1c7fc01 100644--- a/app/shared/canvas-components/primitives/heading.tsx+++ b/app/shared/canvas-components/primitives/heading.tsx@@ -2,13 +2,7 @@ import { type Style, components } from "@webstudio-is/sdk";export { HeadingIcon as Icon } from "~/shared/icons";// Webstudio specific default styles for the node type.-export const defaultStyle: Style = {- minHeight: {- type: "unit",- unit: "em",- value: 1,- },-};+export const defaultStyle: Style = {};export const children = ["Heading you can edit"];diff --git a/app/shared/canvas-components/primitives/paragraph.tsx b/app/shared/canvas-components/primitives/paragraph.tsxindex c48b2b0539..c244294c8e 100644--- a/app/shared/canvas-components/primitives/paragraph.tsx+++ b/app/shared/canvas-components/primitives/paragraph.tsx@@ -2,13 +2,7 @@ import { type Style, components } from "@webstudio-is/sdk";export { TextAlignLeftIcon as Icon } from "~/shared/icons";// Webstudio specific default styles for the node type.-export const defaultStyle: Style = {- minHeight: {- type: "unit",- unit: "em",- value: 1,- },-};+export const defaultStyle: Style = {};export const children = ["Pragraph you can edit"];