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

Scrollbar controls appear twice if body is set to display: grid #144

Open
AlexAegis opened this issue Oct 4, 2022 · 3 comments
Open

Scrollbar controls appear twice if body is set to display: grid #144

AlexAegis opened this issue Oct 4, 2022 · 3 comments

Comments

@AlexAegis
Copy link

AlexAegis commented Oct 4, 2022

Problem

image

Both vertically and horizontally I can see 2 controls on both ends.

Visually the duplicated controls point to the same direction, but move the scrollbar the other direction.

I illustrate:

[move left][move right] ---- scrollbar ---- [move left][move right]

And same thing vertically.

Reproduction

This happens if I set the body to display: grid

body {
	display: grid;
}

Workaround:

Don't do it.

@vmorrisonwood
Copy link

vmorrisonwood commented Nov 10, 2022

This is suddenly happening to me with display:flex as well. It did not appear this way for a little bit but for some reason is, and I'm not sure why. Same behaviour as OP - the duplicated controls work in reverse. Cannot easily find why this is in Inspect Element or the CSS itself.

image

EDIT: Was able to fix it by moving display:flex to the main container instead of it's parent. Not really sure why this changes the behaviour but it works so I won't complain!

@vncscoelho
Copy link

::-webkit-scrollbar-button:vertical:start:increment,
::-webkit-scrollbar-button:vertical:end:decrement,
::-webkit-scrollbar-button:horizontal:start:increment, 
::-webkit-scrollbar-button:horizontal:end:decrement 
{
    display: none;
}

@edwardmyung
Copy link

::-webkit-scrollbar-button:vertical:start:increment,
::-webkit-scrollbar-button:vertical:end:decrement,
::-webkit-scrollbar-button:horizontal:start:increment, 
::-webkit-scrollbar-button:horizontal:end:decrement 
{
    display: none;
}

That does the trick. Thanks @vncscoelho

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

No branches or pull requests

4 participants