Skip to content
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

Large gap displayed to left of editor at browser widths of 782px and 960px. #19011

Closed
talldan opened this issue Dec 9, 2019 · 3 comments · Fixed by #21661
Closed

Large gap displayed to left of editor at browser widths of 782px and 960px. #19011

talldan opened this issue Dec 9, 2019 · 3 comments · Fixed by #21661
Assignees
Labels
General Interface Parts of the UI which don't fall neatly under other labels. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@talldan
Copy link
Contributor

talldan commented Dec 9, 2019

Describe the bug
A large gap is displayed down the side of the editor at particular viewport widths (960px and 782px).

I have a feeling this bug has been around for a long time. It's pretty hard to spot, and I only noticed it when watching the end-to-end tests, which run at 960px. It's also more obvious with the background color that Twenty Twenty uses.

When the admin menu collapses at 960px and 782px, the Gutenberg layout only adjusts at 959px and 781px.

The issue seems to be happening because WordPress admin uses desktop first (max-width) media query breakpoints, while Gutenberg uses mobile first (min-width), so the media queries take effect at different widths.

To reproduce
Steps to reproduce the behavior:

  1. Set the browser window width to 960px or 782px.
  2. Observe that the editor has a white gap down the side.

Expected behavior
No gap is present.

Screenshots
Screen Shot 2019-12-09 at 4 44 12 pm

Screen Shot 2019-12-09 at 4 44 26 pm

@talldan talldan added [Type] Bug An existing feature does not function as intended General Interface Parts of the UI which don't fall neatly under other labels. labels Dec 9, 2019
@talldan talldan changed the title Large gap displayed to left of screen at browser widths of 782px and 960px. Large gap displayed to left of editor at browser widths of 782px and 960px. Dec 9, 2019
@talldan
Copy link
Contributor Author

talldan commented Dec 9, 2019

An easy fix is to change the breakpoints to 783px and 961px in Gutenberg, not sure if that's something we'd consider though. All the breakpoints should probably be off-by-one, but it's only these two that cause a visual issue.

The other, probably better option is to rely on browser layout rather than setting a specific left value on the .edit-post-layout.

@youknowriad
Copy link
Contributor

we have an editor-left mixin to assign the right "left" value. The problem is that there's so many use-cases/variations in Core and we're probably missing one (sidebar open, closed, auto-folded, responsive...)

@jorgefilipecosta
Copy link
Member

The problem for 960px was solved we should apply a similar fix to 5945e48 to fix the 782 breakpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
General Interface Parts of the UI which don't fall neatly under other labels. [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants