W3C home > Mailing lists > Public > www-style@w3.org > April 2013

Re: [css-overflow][css3-regions] CSS Overflow covering CSS Regions use cases

From: Alan Stearns <stearns@adobe.com>
Date: Tue, 9 Apr 2013 18:17:21 -0700
To: Johannes Wilm <johannes.wilm@sourcefabric.org>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <CD8A02F9.28474%stearns@adobe.com>
On 4/9/13 4:03 PM, "Johannes Wilm" <johannes.wilm@sourcefabric.org> wrote:

>Hey,
>it is my understanding that some browser rendering engines don't want to
>implement CSS Regions, as they believe that the CSS Overflow spec can
>take care of all the use cases of CSS Regions.

My hope is that we proceed with both. I think overflow:fragments is useful
for some scenarios by itself, and I want to be able to set
overflow:fragments on a CSS Region element in some cases. But if you want
to add anything more than what overflow:fragments provides out of the box
(as your examples do) there isn't much you can do to extend the feature.
With CSS Regions you have the CSSOM hooks to add more functionality, as
you have.

>
>
>Let me show you my use case -- BookJS. It's a tiny javascript script that
>uses CSS Regions to create book like contents from plain HTML. It flows
>the content into pages, and additionally it plays some extra content on
>each page (page numbers, running headers)
> and lets some elements escape the general content flow -- such as
>footnotes and  top floats (and hopelfully soon: margin notes).
>
>
>You can find some examples working with current Webkit/Blink here:
>http://sourcefabric.github.io/BookJS/
>
>
>I can understand that there may be reasons to prefer other ways than CSS
>Regions, but it would be really good if the CSS Overflow spec takes into
>consideration use cases such as this.

Going through your code, I see this:

1. overflow:fragments would work for your basic pagination - you could
remove the code that deals with adding or removing pages.

2. You make use of the Regions CSSOM for determining which fragment an
element falls into. I think this would need to be added to
overflow:fragments to fit your use.

3. Each page uses a flex container to position the contents, and each CSS
Region is a flex item in one of those containers. This requires the
ability to place fragment containers in separate parents. Perhaps the
overflow proposal would allow this somehow once the pagination sections
are in?

4. Your use of ::before and ::after makes me wonder if and how those
pseudo-elements could be used with the ::nth-fragment pseudo-elements. The
in-cards example [1] in the overflow spec could show numbered cards if
this were possible.

Thanks,

Alan

[1] http://dev.w3.org/csswg/css-overflow/#fragment-overflow
Received on Wednesday, 10 April 2013 01:17:53 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 10 April 2013 01:17:54 UTC