-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BlockCanvas: Fix the height prop and width of the block editor #65977
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -380,6 +380,7 @@ function Iframe( { | |
style={ { | ||
...props.style, | ||
height: props.style?.height, | ||
border: 0, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where was this border coming from that it has to be reset here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The browser default for iframes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, maybe a tiny comment would help. |
||
} } | ||
ref={ useMergeRefs( [ ref, setRef ] ) } | ||
tabIndex={ tabIndex } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.block-editor-iframe__container { | ||
width: 100%; | ||
height: 100%; | ||
overflow-x: hidden; | ||
} | ||
|
||
.block-editor-iframe__scale-container { | ||
height: 100%; | ||
} | ||
|
||
.block-editor-iframe__scale-container.is-zoomed-out { | ||
$container-width: var(--wp-block-editor-iframe-zoom-out-container-width, 100vw); | ||
$prev-container-width: var(--wp-block-editor-iframe-zoom-out-prev-container-width, 100vw); | ||
width: $prev-container-width; | ||
margin-left: calc(-1 * (#{$prev-container-width} - #{$container-width}) / 2); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved these tiles to style.scss instead of content.scss because AFAIK these apply to elements that are rendered outside of the iframe.