Re: overflow: repeat – Repeating Content for CSS

Mike Sherov
Chief Technologist
SNAP Interactive, Inc. | Ticker: STVI
http://snap-interactive.com | http://ayi.com

On Aug 27, 2013, at 11:55 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

> On Tue, Aug 27, 2013 at 8:43 AM, Brian Blakely <anewpage.media@gmail.com> wrote:
>> Abstract
>> --
>> Scrolling content which must end at its beginning currently requires
>> JavaScript – sometimes mountains of it (and pretty complex, to boot)
>> depending on the use case.  "repeat" and associated values for the overflow
>> property bring this functionality into the user agent, accelerating for app
>> developers their speed to market and level of effort regarding this very
>> common design pattern, and doing so in a very familiar way.
>>
>>
>> Common Use Cases
>> --
>> * Infinitely-repeating carousels
>> * Pickers
>
> It took me a while to understand this from your description, but
> you're just describing a scrolling container that "wraps around" at
> the end, correct?
>
> I agree that such a thing would be useful.
>
>> Q: What about scroll indicators?
>> A: This should be implemented as befits the user agent, but wrapping the
>> indicators with the content is one possibility.
>
> This isn't a complete enough answer.  Do you have *any idea* how one
> might show a scrollbar that's useful for wrapping scroll?  Without a
> good idea, I don't see how anyone can implement this.

As a first naive attempt:

The slider would be bound to the content, the same as a non repeating
content area. For UAs that provide clickable arrows at the scrollbar
endcaps, they would function the same as keyboard or gesture nav,
which would behave as follows: The slider would wrap, mimicking the
content placement. This would potentially cause situations where the
slider itself is wrapped and is partially present at the top and
bottom of a vertical scrollbar (or left and right of a horizontal
one).

This does not provide a way to cause the repeat behavior using the
slider alone. We could solve that by specifying that dragging the
slider past the end of the scrollbar causes the slider to wrap,
thereby disconnecting the slider from the pointing device visually.
However, this approach doesn't provide a bounds to the slider that
some users rely upon when they quickly drag to get to the "end" of the
content. They may end up scrolling right past the end, and may be
slightly irritating.

This also doesn't solve for the fact that this scrollbar UI doesn't
visually indicate repeated overflow behavior, and would need to be
discovered through use of arrows, keyboard nav, gestures, or
accidental slider drag past the bounds of the scrollbar. However, I'm
not sure that needs to be solved.

Thoughts?

>
> ~TJ
>

Received on Wednesday, 28 August 2013 00:56:29 UTC