-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Patterns: Add black border back when editing synced pattern in the post editor #57631
Conversation
Size Change: +2.02 kB (0%) Total Size: 1.69 MB
ℹ️ View Unchanged
|
@@ -1,5 +1,6 @@ | |||
.editor-canvas__iframe { | |||
&.has-history { | |||
padding: $grid-unit-60 $grid-unit-60 0; | |||
background-color: $gray-900; |
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.
This color already exists for .edit-post-visual-editor
:
Could we somehow leverage that?
Or switch off the #fff
background color for iframe[name=editor-canvas]
using the has-history
class. Here: https://github.com/WordPress/gutenberg/blob/1b2dac78b60c4bab6d1dcb771498d99fbea2ff54/packages/block-editor/src/components/block-canvas/style.scss
That way we don't need this new CSS file.
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.
Here's this PR using a theme (empty theme) that doesn't specify a background color:
2024-01-11.10.16.49.mp4
Maybe not as important as the issue raised in #57330 so long as the pattern is visible?
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.
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 think it achieves what we want. I can't see any regressions from #57330 👍🏻
…dditional css file
What?
Adds the black border back when editing a synced pattern in isolation in the post editor.
Why?
The black background was originally just showing due to a bug which was fixed in #57330. Since this fixed the border is displaying as white.
How?
Explicitly set the black border when the pattern is in the focused edit mode, which is identified if the
.has-history
class is set.Testing Instructions
Edit original
in the toolbarScreenshots
Before:
pattern-border-before.mp4
After:
pattern-edit-border.mp4