Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Different looks on scrollbars when using USB mouse vs wireless/trackpad in OS X

I just realized that Mac OS X shows different scrollbars in the browsers when a USB mouse is connected or not. I tried the code below and it looks ok, but now when I disconnect the mouse it applies to the wireless settings as well, which I was happy with already (scrollbars only showing when scrolling or hovering it).

::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 15px;
    background-clip: padding-box;
    border: 4px solid rgba(0, 0, 0, 0);
    -webkit-border-radius: 7px;
    background-color: rgba(0, 0, 0, 0.15);
    -webkit-box-shadow: inset -1px -1px 0px rgba(0, 0, 0, 0.05), inset 1px 1px 0px rgba(0, 0, 0, 0.05);
}
::-webkit-scrollbar-thumb {
    border: 4px solid rgba(0, 0, 0, 0);
    background-clip: padding-box;
    -webkit-border-radius: 7px;
    background-color: rgba(255, 255, 255, 0.8);
    -webkit-box-shadow: inset -1px -1px 0px rgba(0, 0, 0, 0.05), inset 1px 1px 0px rgba(0, 0, 0, 0.05);
}

Can I: 1. Write CSS for the USB mouse only? 2. Do something that makes the USB mouse look/act like the wireless mouse.

Thank you!

like image 962
SeaBass Avatar asked Jun 21 '17 06:06

SeaBass


People also ask

Can you have different scroll directions for mouse and trackpad Mac?

To do this, click the menu icon, go to Preferences > App, and tick the Start at login box. Scroll Reverser will now launch whenever you boot up, providing automatic scrolling separation for your mouse and trackpad. If you want more control over your system, you can add, remove, and delay your Mac's startup items.

How do I change the scrollbar on my Mac?

Click the System Preferences icon in the Mac's desktop dock, or go to the Apple Menu and choose System Preferences. When the System Preferences box opens, click the General icon in the top row. In the General box, go to the “Show scroll bars” section and click the button next to Always.

Why is my scroll wheel inverted Mac?

Enable Mac Mouse Reverse Scroll Open System Preferences from the dropdown menu. Select Mouse, since you are using an external mouse rather than the trackpad. Press Point and Click. Uncheck the box marked Scroll direction: Natural to invert the direction of the mouse scroll.

How do I change my mouse inversion on Mac?

To invert scrolling on a Mac, click the Apple icon → Click "System Preferences" → Click either the "Trackpad" or "Mouse" icon → Click the "Scroll direction: Natural" check box to uncheck it.


Video Answer


1 Answers

Here is what I found: OSX: Remove scrollbars that appear when using a mouse

Fortunately the solution lay in the General preferences pane. All that's needed is to change "Show scroll bars" to "When scrolling" instead of "Automatically based on mouse or trackpad.

enter image description here

Conclusion: I think the solution is beyond our/developers' control. Just leave it to the user.

like image 55
Alessia Avatar answered Oct 21 '22 16:10

Alessia