In Firefox, if you do a search (find-in-page), the browser will add lines to the scrollbar for each search-result found to make it easier to see how many search-results there are and where in the page they are located, as seen in the screenshot.
Is this only part of the browser, or is it achievable by a webpage (CSS/JavaScript)? All I can find is information about generic customization of size and shape of the scrollbar, not about marks in the scrollbar.

default browser-based UIyou mean it's the browser-chrome, not the page? Firefox exposes pretty much everything for customization, there's nothing for this, like through the shadow-dom or something, not even via about:config options?default browser-based UI you mean it's the browser-chromeCorrect. I tend not to use the word 'chrome' when talking about the UI of the browser to save confusion :) What I can guarantee though is that the document outline shown when searching won't be part of the DOM. I haven't looked in toabout:config, but I highly doubt there's anything configurable about it in there