-
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
Block editor: move is-typing and is-outline-mode classes up the tree #30106
Conversation
// when the block itself is selected, without it they would also show when a parent block | ||
// is selected. | ||
div[data-type="core/freeform"].is-selected &, | ||
div[data-type="core/freeform"].is-typing & { |
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 rule doesn't do anything. When is-typing
was added to a block previously, it would also have the is-selected
. It isn't possible for a block to be typed in without it also being selected. This seems like a remnant from old block classes when we would omit the is-selected
class when typing in a block to remove the selected styles.
Size Change: -30 B (0%) Total Size: 1.41 MB
ℹ️ View Unchanged
|
a0c0394
to
cef9788
Compare
👍 👍 from me, great PR, works as intended, and I tested with navigation mode and while writing. All's good from here. Does it need a code review? Happy to ✅ otherwise. |
Thanks for testing, @jasmussen! It's a small change and I just wanted to confirm with you that everything is still working as intended with the CSS adjustments. I'll go ahead and merge. |
Description
It doesn't make sense for these classes to be added to blocks. They should be added to the block editor (wrapper). Currently
is-outline-mode
is added to every single block in the whole block editor that sets this setting to true. Foris-typing
, we have an exception to only add it to the selected block because it would otherwise impact performance negatively.How has this been tested?
In the site editor, the outline should disappear when typing in a block.
Screenshots
Types of changes
Checklist: