From 2ccf74bbdd7c6d3c537de7180ecceac17aa103f5 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Tue, 17 Nov 2026 18:43:01 -0500 Subject: [PATCH] fix: Full-width tables render at default width in the template editor (#14621) --- app/components/Scene.tsx | 2 ++ shared/editor/components/Styles.ts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/components/Scene.tsx b/app/components/Scene.tsx index 4f1049a5a4..30dd79c12b 100644 --- a/app/components/Scene.tsx +++ b/app/components/Scene.tsx @@ -61,6 +61,8 @@ const Scene: React.FC = ({ const FillWidth = styled.div` width: 100%; + container-type: inline-size; + --container-width: 100cqi; `; export default Scene; diff --git a/shared/editor/components/Styles.ts b/shared/editor/components/Styles.ts index b89a4cceb1..2f72b0c81d 100644 --- a/shared/editor/components/Styles.ts +++ b/shared/editor/components/Styles.ts @@ -1203,7 +1203,7 @@ th .image .${EditorStyleHelper.imageWrapper} img { max-width: 100vw; clear: both; position: initial; - transform: translateX(calc(50% + var(--container-width) * -0.5 + var(--full-width-transform-offset))); + transform: translateX(calc(50% + var(--container-width) * -0.5 + var(--full-width-transform-offset, 0px))); img { max-width: 100vw; @@ -1216,7 +1216,7 @@ th .image .${EditorStyleHelper.imageWrapper} img { .${EditorStyleHelper.tableFullWidth} { transform: translateX(calc(50% + ${ EditorStyleHelper.padding - }px + var(--container-width) * -0.5 + var(--full-width-transform-offset))); + }px + var(--container-width) * -0.5 + var(--full-width-transform-offset, 0px))); .${EditorStyleHelper.tableScrollable}, table {