This is usually a percentage.
eg. if the visible area is 99% of the total area, the scrollbar is 99% of the height.
Similarly, if visibility is 50% of the total area, the scroll bar is 50% of the height.
Just remember to make the minimum size something reasonable (e.g. at least 18-20px)
Thus, if you have a visible height of 500 pixels and a content of 50,000 pixels, even if it should make the thumb screw height (1% of 500 pixels = 5 pixels) ... use the default minimum instead (e.g. 20 pixels )
scunliffe
source share