-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow margins to collapse & refactor block toolbar (#7365)
* Allow collapsing margins & adjust block toolbar This PR refactors how the block toolbar is positioned. Because we use sticky, the toolbar is part of the flow of the block itself. In this PR it uses translate to pull it out of the flow, making the positioning more resilient. The primary purpose of this PR is to allow margins to collapse. When two margins meet, and no borders or paddings are present, they collapse. I.e. a `p` with a 20px margin next to a similar `p` will have only 20px margin between them, not 40px, because the two siblings collapse to whichever margin is the largest. By allowing margins on blocks to collapse, we can make it easier to theme the editor to look like the frontend. * docs: Tweak comment in CSS * fix: Multi-block selection on mouse movement after mouseDown * Fix rebase issues, part 1 - Fixed toolbar position on mobile. - Fixed toolbar position on desktop breakpoints - Fixed appender regression - Fixed issue with warning blocks having no hover or selected outlines. - Fixed positioning of ellipsis on wide blocks. - Fixed issue with full-wide gallery. * Fix rebase issues, part 2. - Fixed a few typos and an issue with warnings. This will be revisited in a future patch also being worked on separately. - Fixed position of toolbar on wide and fullwide. - Fixed positioning of mover on wide and fullwide. - Fixed issue with additional margins in columns block. - Fixed issue with the invisible toolbar on the Column (singular) block breaking the layout. This also fixed an issue with the hover label and sibling inserter positioning on the column. * Fix rebase issues, part 3. - Fixed a regression in IE. - Fixed the position of editor warning after the refactor. * chore: Typo tweaks * Remove comment. * Tests: Make adding blocks e2e test pass by refering the area below editor explicitly
- Loading branch information
Showing
15 changed files
with
265 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.