My brain was picked apart the other day. Virtual scrolling is, in a handwavy sense, pagination with (semi) automatic navigation. Touché.
Infinite scrolling is unusual. Most implementations are “almost infinite” to avoid excessive length (memory).
-
Infinite scrolling: Limits content to an arbitrarily large amount to avoid exhausting memory.
-
Virtual scrolling: Unload everything except the visible viewport + a top and bottom offset. Pad the rest.
Virtual scrolling is infinite, but breaks auxiliary actions ( CTRL + F ) because what’s on the screen is the content.
document.addEventListener("scroll", function() {
console.log(document.querySelectorAll('*').length)
});
The most popular library appears to be https://infinite-scroll.com.
It’s amazing how trends in modern mainstream web development have seemingly inverted. One such example (an old bookmark) while following tech more closely in school;
Therefore by purposefully giving the user a blank page, we are giving him information that the app is still loading. The user knows that the app will be functional when he sees boxes and buttons.
The truth was it didn’t matter, at least, not so much as “position independent code”, kind of. Tech appears to do a ten year amnesiac/discovery routine. Web components arrived around that time too.
The best CSS Framework? I don’t know. Complexity moves in mysterious ways. The many interpretations model must be satisfied.
- in CSS (canonical)
- CSS in (write once and time driven)
- CSS in JavaScript (framework driven)
- CSS in Shadow (company/department driven)
- CSS in Scoped Formats ( driven)
- CSS in Preprocessors (design system driven)
I’d say, choices reflect environmental factors (social or otherwise) at play. If you’re lucky enough to choose, then suitability favors what draws the finish line closer? I’ve no advice since I’d rarely have the time/luxury to choose anyway. I’m usually thinking about the possibility of more types, sub–types ( in #1: , classless, etc), and the transposition strategy and speed between each class/type.