W3C home > Mailing lists > Public > www-style@w3.org > June 2015

Re: : [css-snappoints] elements and nested scrollers

From: Robert O'Callahan <robert@ocallahan.org>
Date: Tue, 16 Jun 2015 13:12:54 +1200
Message-ID: <CAOp6jLbs7bVR29z4if_QHkSsUjauEUyiq8xFaqs7-X2ga68Rzg@mail.gmail.com>
To: Simon Fraser <smfr@me.com>
Cc: "www-style@w3.org list" <www-style@w3.org>
On Tue, Jun 16, 2015 at 7:23 AM, Simon Fraser <smfr@me.com> wrote:

> In New York, we resolved to add back ‘elements’ as a value for
> scroll-snap-points-x/y[1].
>
> However, I’m having second thoughts. Consider:
>
> <div id="outer" style="overflow:scroll; scroll-snap-points-x: elements;>
>     <div id=“intermediate" style="overflow:scroll">
>         <div class=“inner" style="scroll-snap-coordinate:50% 50%"></div>
>         ... more ...
>     </div>
> </div>
>
> Now, scrolling #intermediate requires that .inner items be snapped to
> #outer, so as the middle scroller scrolls, the outer scrolling is snapping
> to different positions. This seems undesirable. In general it seems bad for
> snapping to ever cross scroller boundaries. In fact, this seems worse than
> the issue I was trying to address with ‘elements’, which was that something
> with with "scroll-snap-coordinate” could suddenly start snapping to a
> different scroller (maybe even the document), if different intermediate
> elements gain or lose scrollability.
>
> There is one possible use case for skipping ancestor scrollers, which is
> if you want free horizontal scrolling in your immediate scroll container,
> but snapping on Y to happen on, say, the document.
>

Can we just say that an element contributes a horizontal scroll position to
the nearest ancestor whose overflow-x is "auto" or "scroll", and a vertical
scroll position to the nearest ancestor whose overflow-y is "auto" or
"scroll"?

Rob
-- 
oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo
owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo
osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo
owohooo
osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o
oioso
oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo
owohooo
osoaoyoso,o o‘oYooouo ofooooolo!o’o owoiololo oboeo oiono odoaonogoeoro
ooofo
otohoeo ofoioroeo ooofo ohoeololo.
Received on Tuesday, 16 June 2015 01:13:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:54 UTC