Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Try: Larger drag handles #10331
This is an attempt to make a larger target area for drag handles. The handle itself doesn't change its appearance, but you now have a larger target area for your cursor, as depicted here:
Basically the visible handle is now a pseudo element positioned inside the larger handle container.
Fixes #8206 — the larger target area makes it a bit easier to grab the handle when there's a block below the spacer block.
I'd like to also extend this to the image block but just want the OK before going forward with that.
Some other notes:
I introduced a new variable,
I am also using another new variable
@tofumatt Unfortunately I was not able to remove the
So, in lieu of that, I wrote a bit of documentation and linked back to this ticket!
A few other tweaks:
@tofumatt Okay I think I got it now! I couldn't remove the entire style definition, but I could remove the properties individually. So we can now avoid
I'm pretty sure spacers and images are the only uses of drag handles in Gutenberg core blocks but if I'm wrong definitely let me know
A future improvement here might be to ship our own
tofumatt left a comment •
Sooooo, this is good but given we reproduce this bit of code twice, maybe we want a common component that is a
I think this is worth shipping now but can you file a follow-up issue to combine these? Actually, maybe it wouldn't make sense as the overrides vary? I dunno, if you think it's worth combining them a follow-up code quality issue would be cool. If you think it's not worth it that's fine.