Block editor: move is-typing and is-outline-mode classes up the tree#30106
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.
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-modeis 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: