- From: Andy Earnshaw <notifications@github.com>
- Date: Fri, 08 Feb 2019 04:43:09 -0800
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/webcomponents/issues/791@github.com>
This is something that I've [proposed](https://github.com/w3c/csswg-drafts/issues/3397) as a CSSOM feature, but @annevk suggested I also raise an issue here to widen the discussion. I have [a gist](https://gist.github.com/andyearnshaw/5cc3b6e158879481515abef8c20d92a7) detailing the CSSOM proposal. In brief, virtual scrolling is a feature of very long lists, grids and some other components. You would usually implement it using a custom scrollbar, or using some boilerplate HTML, CSS and JS to hold an element in place and get native scrollbars with the desired scrolling area. The problem with the former is that the experience isn't consistent with native scrollbars and things like touch/momentum scrolling have to be implemented from scratch. The main issue with the native scrollbars approach is that browsers have a limit on the largest size/scroll size a single element can have. A proper solution for virtual scrolling could potentially see scroll sizes of up to `Number.MAX_SAFE_INTEGER`. Anne's comment was that there are some elements that scrollbars wouldn't make sense on. He's right, of course, so maybe this could be a feature for Shadow DOM instead (so that you could only have virtual scrolling on the same subset of elements that can have shadow trees). Regardless, it would be great to get some more discussion going and generate some interest in finding a solution and moving forward. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/791
Received on Friday, 8 February 2019 12:43:30 UTC