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 {