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

TASK: Prevent the hover scrollbar from squashing content #9

Merged
merged 4 commits into from
Mar 23, 2019

Conversation

albe
Copy link
Member

@albe albe commented Feb 8, 2019

Related to #8 and one attempt at actually fixing the issue shown there. However, this leads to some labels/icons possibly being cut, which is also not optimal (but still better than the content jumping).

Related to #8 and one attempt at actually fixing the issue shown there. However, this leads to some labels/icons possibly being cut, which is also not optimal (but still better than the content jumping).
@albe
Copy link
Member Author

albe commented Feb 8, 2019

neos_docs_glitch_fix

That's how the nav looks with the overflow-y: overlay solution. Notice the search icon being cut off a bit. This can again be solved for this single place easily, but shows the general drawback of this method.

@albe
Copy link
Member Author

albe commented Feb 8, 2019

On further investigation, overflow: overlay seems to not be an official standard (and only supported in chrome and safari): w3c/csswg-drafts#92

instead the official solution is supposed to be scrollbar-gutter (w3c/csswg-drafts#92 (comment)), which is still in draft stage and not supported by browsers yet.

@rolandschuetz
Copy link
Collaborator

@albe Do we still need this, when #8 is merged?

@albe
Copy link
Member Author

albe commented Mar 22, 2019

Yes, as #8 is just a small workaround, that only reduced the number of cases where the jumping happened, by reducing the bottom margin and hence giving a bit more room.

However there is still no official standard that creates the wanted scrollbar behaviour, as long as scrollbar-gutter is not finalized (and supported in browsers), which might still be a long time (https://css-tricks.com/almanac/properties/s/scrollbar-gutter/).

I'd go with the fix as is with my latest commits, which do the following:

  • in Chrome, the overlay behaviour is applied
  • in IE/Edge, the -ms-overflow-style will be applied together with overflow: auto, causing the scrollbar to hide automatically and overlay the content, preventing the bug
  • in Firefox, overflow: auto is applied normally, but for some reason the bug is not happening there anyway

@rolandschuetz rolandschuetz merged commit 170fe42 into master Mar 23, 2019
@albe albe deleted the sidenav-overflow-1 branch March 23, 2019 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants