Created
September 1, 2022 15:15
-
-
Save jsmayo/253e4e75236a7e804ff3e357c51a7894 to your computer and use it in GitHub Desktop.
Always display scrollbar in Mac OS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<ul> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
<li>Sample Content</li> | |
</ul> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.container {max-height: 200px; border: 1px solid #dadada; overflow: auto;} | |
/* Overwrite the default to keep the scrollbar always visible */ | |
::-webkit-scrollbar { | |
-webkit-appearance: none; | |
width: 7px; | |
} | |
::-webkit-scrollbar-thumb { | |
border-radius: 4px; | |
background-color: rgba(0,0,0,.5); | |
-webkit-box-shadow: 0 0 1px rgba(255,255,255,.5); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment