Scrollbar thumb height in css

I don't think so, the height of the thumb is based in the size of content, you can change the width inside the ::-webkit-scrollbar but the height will always be based on the content.

::-webkit-scrollbar              { /* 1 */ }
::-webkit-scrollbar-button       { /* 2 */ }
::-webkit-scrollbar-track        { /* 3 */ }
::-webkit-scrollbar-track-piece  { /* 4 */ }
::-webkit-scrollbar-thumb        { /* 5 */ }
::-webkit-scrollbar-corner       { /* 6 */ }
::-webkit-resizer                { /* 7 */ }

css-tricks

enter image description here

Source


If you want to set fixed min height to the scrollbar thumb even when scroll. we can set like below:

::-webkit-scrollbar-thumb {
    min-height: 40px;
   }

You can do this:

::-webkit-scrollbar-thumb{
    background-color: transparent;
    border-top: 60px solid green /*or any height and color you want*/;
}

that will make the height constant with value of 60px, but pay attention that it will not be able scroll to the very end because of the transparent space.