-
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
Zoom-out: Move default background to the iframe component #66284
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 |
---|---|---|
@@ -1,8 +1,19 @@ | ||
.editor-visual-editor { | ||
position: relative; | ||
display: flex; | ||
|
||
// This duplicates the iframe background but it's necessary in some situations | ||
// when the iframe doesn't cover the whole canvas | ||
// like the "focused entities". | ||
background-color: $gray-300; | ||
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. If we have this rule, why do we still need the background in 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. For third-party block editor usage. (zoom-out in storybook for example) |
||
|
||
// This overrides the iframe background since it's applied again here | ||
// It also prevents some style glitches if `editor-visual-editor` | ||
// like when hovering the preview in the site editor. | ||
iframe[name="editor-canvas"] { | ||
background-color: transparent; | ||
} | ||
|
||
// Centralize the editor horizontally (flex-direction is column). | ||
align-items: center; | ||
|
||
|
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 don't remember exactly, but I think we wanted to have
transparent
background (now you have twobackground-color
rules). Maybe something with the background in theme.json if defined? 🤔 Of course if that was the reason, block editor shouldn't have that dependency..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.
Oh it seems this introduced the issue in #62223 back.
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.
Actually, the issue seems in trunk too, so there must be something else going on. The regression is not caused by this PR. cc @jasmussen