adoxography / tailwind-scrollbar

Scrollbar plugin for Tailwind CSS
MIT License
951 stars 39 forks source link

Move `overflow: overlay` from `scrollbar` and `scrollbar-thin` into separate class #55

Closed TS-Tobias closed 1 year ago

TS-Tobias commented 1 year ago
    I am having the same issue. The scrollbar hovers over the page content which is not the behavior of the default scrollbar in chromium-based browsers.

It is not true that overflow-overlay only affects Webkit-based web browsers (I observed this behavior in MS Edge (Chromium)). https://github.com/adoxography/tailwind-scrollbar/blob/a28e46b8c257b7ddc43abb9a03f2a56c18bcd7eb/src/utilities.js#L32

Would it be possible to remove overflow-overlay from the scrollbar and scrollbar-thin class and instead create an additional class scrollbar-hover to enable this behavior for chromium-based browsers?

overflow: overlay is deprecated anyway and will eventually stop working (docs). To prevent the behavior of scrollbar and scrollbar-thin from changing in the future, it makes more sense to extract the overflow: overlay property into a separate class and give users the choice if they want to use it or not.

Originally posted by @TS-Tobias in https://github.com/adoxography/tailwind-scrollbar/issues/12#issuecomment-1342331073

adoxography commented 1 year ago

The comment in there comes from a misunderstanding of my own - I had been under the impression that, since Chrome uses -webkit- vendor flags, it was "Webkit based." (D'oh!) Of course, this hasn't been true for almost 10 years now. Where I say "webkit-based" there, I really mean "Chrome."

I'll have to do a little more research, but I vaguely remember that the reason I included that default styling was to get Chrome to behave like Firefox. (Firefox offers much less scrollbar customizability than Chrome does, so it ends up being the least common denominator.) I think the overflow logic on Firefox is actually more complicated than I realized at the time, though, so either way, it needs a revisit.

Of course, this is all based on vague memories of something I thought about a couple years ago, so I could be talking straight out of my behind.

adoxography commented 1 year ago

Fixed in version 3.

camilo-mujica commented 1 year ago

Fixed in version 3.

Hello! Is version 3 the current stable version?

adoxography commented 1 year ago

Sure is.