Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
changed background color of iframe instead of adding a new class
  • Loading branch information
MaggieCabrera committed Apr 25, 2024
commit 133b07e282a4571833827ead59aa32baf3e29ed6
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ iframe[name="editor-canvas"] {
height: 100%;
display: block;

&:not(.has-editor-padding):not(.is-zoomed-out) {
background-color: $white;
}

&.is-zoomed-out {
&:not(.has-editor-padding) {
background-color: $gray-300;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we consistently apply this grey background? Why does it need to be white for non zoom out?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair question.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will affect other parts, like isolated views of the nav block for example. But it's a good lead, I will investigate

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isolated views also use the gray background; I don't think white is used anywhere on its own.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for checking! Why can't we add the background for .has-editor-padding? Might be worth commenting.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I went back to figure out why we need it, and it comes from this PR #57631 and the white color comes from this other one #57330. So in reality right now we could keep the gray background for all cases, I think

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ function EditorCanvas( {
'edit-site-visual-editor__editor-canvas',
{
'is-focused': isFocused && canvasMode === 'view',
'is-zoomed-out': isZoomOutMode,
}
),
...props,
Expand Down