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.

don't add padding to root element

Oleg Isonend7e4363c7fd0
diff --git a/app/canvas/features/wrapper-component/use-css.tsx b/app/canvas/features/wrapper-component/use-css.tsx
index 3e4dd0c8f8..492aa741a3 100644
--- a/app/canvas/features/wrapper-component/use-css.tsx
+++ b/app/canvas/features/wrapper-component/use-css.tsx
@@ -48,9 +48,10 @@ const usePreviewCss = ({ instance, css }: UseCssProps) => {
const voidElements =
"area, base, br, col, embed, hr, img, input, link, meta, source, track, wbr";
+const rootElement = "body > div";
const defaultStyle = {
- [`&:not(${voidElements}):empty`]: {
+ [`&:not(${voidElements}):not(${rootElement}):empty`]: {
outline: "1px dashed #555",
outlineOffset: -1,
paddingTop: "$8",