Skip to content

Commit 69836c3

Browse files
committed
Rename outerContainerWidth to scaleContainerWiddth
1 parent 7091205 commit 69836c3

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎packages/block-editor/src/components/iframe/content.scss‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
$frame-size: var(--wp-block-editor-iframe-zoom-out-frame-size);
2424
$inner-height: var(--wp-block-editor-iframe-zoom-out-inner-height);
2525
$content-height: var(--wp-block-editor-iframe-zoom-out-content-height);
26-
$outer-container-width: var(--wp-block-editor-iframe-zoom-out-outer-container-width);
26+
$scale-container-width: var(--wp-block-editor-iframe-zoom-out-scale-container-width);
2727
$container-width: var(--wp-block-editor-iframe-zoom-out-container-width, 100vw);
2828
// Apply an X translation to center the scaled content within the available space.
29-
transform: translateX(calc((#{$outer-container-width} - #{$container-width}) / 2 / #{$scale}));
29+
transform: translateX(calc((#{$scale-container-width} - #{$container-width}) / 2 / #{$scale}));
3030
scale: #{$scale};
3131
background-color: $gray-300;
3232

‎packages/block-editor/src/components/iframe/index.js‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ function Iframe( {
247247
}
248248
}, [ containerWidth, isZoomedOut ] );
249249

250-
const outerContainerWidth = Math.max(
250+
const scaleContainerWidth = Math.max(
251251
initialContainerWidth.current,
252252
containerWidth
253253
);
@@ -357,7 +357,7 @@ function Iframe( {
357357
scale === 'default'
358358
? ( Math.min( containerWidth, maxWidth ) -
359359
parseInt( frameSize ) * 2 ) /
360-
outerContainerWidth
360+
scaleContainerWidth
361361
: scale
362362
);
363363

@@ -379,8 +379,8 @@ function Iframe( {
379379
`${ containerWidth }px`
380380
);
381381
iframeDocument.documentElement.style.setProperty(
382-
'--wp-block-editor-iframe-zoom-out-outer-container-width',
383-
`${ outerContainerWidth }px`
382+
'--wp-block-editor-iframe-zoom-out-scale-container-width',
383+
`${ scaleContainerWidth }px`
384384
);
385385

386386
return () => {
@@ -400,7 +400,7 @@ function Iframe( {
400400
'--wp-block-editor-iframe-zoom-out-container-width'
401401
);
402402
iframeDocument.documentElement.style.removeProperty(
403-
'--wp-block-editor-iframe-zoom-out-outer-container-width'
403+
'--wp-block-editor-iframe-zoom-out-scale-container-width'
404404
);
405405
};
406406
}, [
@@ -412,7 +412,7 @@ function Iframe( {
412412
containerWidth,
413413
windowInnerWidth,
414414
isZoomedOut,
415-
outerContainerWidth,
415+
scaleContainerWidth,
416416
] );
417417

418418
// Make sure to not render the before and after focusable div elements in view
@@ -502,8 +502,8 @@ function Iframe( {
502502
isZoomedOut && 'is-zoomed-out'
503503
) }
504504
style={ {
505-
'--wp-block-editor-iframe-zoom-out-outer-container-width':
506-
isZoomedOut && `${ outerContainerWidth }px`,
505+
'--wp-block-editor-iframe-zoom-out-scale-container-width':
506+
isZoomedOut && `${ scaleContainerWidth }px`,
507507
} }
508508
>
509509
{ iframe }

‎packages/block-editor/src/components/iframe/style.scss‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
}
1010

1111
.block-editor-iframe__scale-container.is-zoomed-out {
12-
$outer-container-width: var(--wp-block-editor-iframe-zoom-out-outer-container-width, 100vw);
13-
width: $outer-container-width;
12+
$scale-container-width: var(--wp-block-editor-iframe-zoom-out-scale-container-width, 100vw);
13+
width: $scale-container-width;
1414
// Position the iframe so that it is always aligned with the right side so that
1515
// the scrollbar is always visible on the right side
1616
position: absolute;

0 commit comments

Comments
 (0)