(live demo - compare scrolling speeds in Firefox)
For quite a while now, a thing that bugged me in Firefox was the inconsistent scrolling speeds across the pages. On some it would seem just fine, while on others you could have a list that scrolls at a ridiculously slow pace. My searches on the subject were inconclusive - while, of course, you can regulate the scroll speed via scripting, that definitely wasn't the case on all these pages.
The culprit, as it turns out, was pretty simple - while most of the browsers scroll the elements for an amount of (screen) pixels per key press or mouse wheel change, Firefox scrolls the elements based on the their font size. Which, on one hand, makes sense, but there's a catch - it's based only on the scrolling element's font size. Content' font sizes are ignored.
So that is why you get odd scrolling speeds - people most often set up styles for the actual content (paragraphs\labels\etc.) and not the scroller\container element.
Luckily, this also means that scrolling speeds can be adjusted easily - you change the container font-size to (100*X)%, and then add a rule to change it's child element sizes to (100/X)%:
Continue reading →