mithi / epic-react-exercises

Practical React exercises with detailed solutions.
https://epic-react-exercises.vercel.app
Apache License 2.0
159 stars 36 forks source link

Bug: Hide ugly scrollbars on Windows. #116

Closed r002 closed 3 years ago

r002 commented 3 years ago

image

image

When I run your app on my Windows machine in Chrome and Edge, I'm seeing horrible scrollbars that uglyify the GUI. This should be a simple CSS fix.

I noticed in your Reddit video that the scrollbars don't appear though. I am guessing you are on Mac?

mithi commented 3 years ago

@r002 I see, that is indeed ugly. Thanks for reporting! Yes I'm on a Mac. I'll have to research how test this though, since I have no access to a windows machine as of the moment, and anytime soon..

mithi commented 3 years ago

@r002 This seems like an elegant solution

https://stackoverflow.com/questions/45501705/how-auto-hide-scrollbar-on-windows-browser

.my-elem {
  overflow: hidden
} 

.my-elem:hover {
  overflow: auto
}
r002 commented 3 years ago

@r002 This seems like an elegant solution

https://stackoverflow.com/questions/45501705/how-auto-hide-scrollbar-on-windows-browser

.my-elem {
  overflow: hidden
} 

.my-elem:hover {
  overflow: auto
}

@mithi -- So it's a bit more complicated than this because if we just hid all scrollbars, then they'd disappear entirely, even when we needed them. (Eg. If the browser window were resized to be very small.) I ended up restyling the scrollbars entirely in the PR I just submitted.


References: