Skip to content

feat(#BRU-7) - scrollbar styling for linux and windows #1589

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

Conversation

lohit-bruno
Copy link
Collaborator

@lohit-bruno lohit-bruno commented Feb 14, 2024

Improved scrollbar styling for linux and windows
scrollbar_styling.webm

@helloanoop helloanoop merged commit bd002ca into usebruno:main Feb 15, 2024
@helloanoop
Copy link
Contributor

Thanks @lohit-1 !

@cvmocanu
Copy link

@lohit-1 : is there a way to turn this off? Thin scrollbars (along with scrollbars that are not always visible) are very bad for usability.

@helloanoop
Copy link
Contributor

@cvmocanu Can you share a screenshot of how the scrollbar appears on your machine. We should be able to provide a toggle to use the system scrollbar instead of overriding it (that was done as a part of this PR).

@cvmocanu
Copy link

It looks like this:
image

Notice that the scrollbar is very thin. This makes it difficult to grab it with the mouse cursor.

(BTW, I'm glad that the scrollbar is always visible. Hidden scrollbars is another usability issue - you don't see what percentage you are scrolled at, just by looking, without scrolling).

@mark99i
Copy link

mark99i commented Apr 10, 2024

Improved scrollbar styling for linux and windows scrollbar_styling.webm

hi, @lohit-1
I have previously worked on this issue, but I have not found an idea.

could you describe in more detail how and why it works?

// scrollbar styling
// the below media query target non-macos devices
// (macos scrollbar styling is the ideal style reference)
@media not all and (pointer: coarse)

I created a test page with this code and it showed:
Windows/Chrome: NO MAC
MacOS14.3/Safari: NO MAC
MacOS14.3/Chrome: NO MAC
Android14/Chrome: MAC

<html>
<head>
    <style>
        div {
            font-size: 40;
        }
        div[data-target="no-mac"] {
            display: none;
        }

        /* win-linux only selector ??? */
        @media not all and (pointer: coarse) {
            div[data-target="mac"] {
                display: none;
            }

            div[data-target="no-mac"] {
                display: block;
            }
        }
    </style>
</head>

<div data-target="mac">MAC</div>
<div data-target="no-mac">NO MAC</div>
</html>

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.

4 participants