Finally starting to wrap my head around some of this stuff. Since Flarum deals in virtual nodes, but many of the adjustments I want to make are in how the actual computed nodes look via CSS, there's no central repository for both. This is exactly what you said earlier, but there's a learning curve for me 🤪
If I've made an adjustment to an element via CSS like, say, adding "margin-top: 120px" to the Scrubber, there's no way to ask the node created by Flarum for this property directly because those are not attributes created on the vnodes themselves but combined later in the browser window. In this case, to access and make a calculation based on such a CSS rule I've had to extend the scrubber via the DiscussionPage config, then pull its computed value from the window:
var myScrub = this.element.querySelector('.DiscussionPage-nav > ul');
window.getComputedStyle(myScrub, null).getPropertyValue("margin-top");
which will return: "120px", and then parse it into a number. Or do it all-in-one like this:
var navMargin = parseInt(window.getComputedStyle(myScrub).getPropertyValue("margin-top"));
Because the thing I'm trying to calculate involves combining some of the inherent values from the nodes such as scrollHeight and computed values such as the one above, it took me awhile to figure out where to get each number from. Thanks for the pointers. I've successfully moved the scrubber to the right part the page via new calculations on the scroll event.
Having one more issue when I actually use the scrubber to change position on the page, so will have to listen to another event and fire a calculation from there, but that should be simpler since the math won't change.