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

[css-regions][css-overflow] named flows and overflow:fragments use case 1

From: Alan Stearns <stearns@adobe.com>
Date: Sun, 6 Oct 2013 18:23:22 -0700
To: "www-style@w3.org" <www-style@w3.org>
Message-ID: <CE775B1A.13935%stearns@adobe.com>
Hey all,

I've been thinking quite a bit lately about how overflow:fragments and CSS
regions fit together. I've been talking to people off and on about this
for the last 16 months, but I figure it's better to write some of this
down and get the ideas logged on this list. This is just the first post in
a series.

I revived the idea of overflow:fragments as one possible solution for the
box generation issue in CSS Regions. It's not the only box-generation
mechanism we've discussed, but it's the one that's received the most
interest. The basic use-case for combining named flows with
overflow:fragments is to use it on the last region in a region chain. I
think overflow:fragments has more uses than this (both with named flows
and without), but it's where I started.

Without overflow:fragments, you can set auto-sizing on the last region in
the region chain. This allows for a fixed-sized region chain to almost
always adapt to its named flow content. But if you add region breaks to
your named flow content, you can get into a situation where you have
defined fewer boxes than breaks. So in this situation, it's very useful to
set overflow:fragments on the last region in the region chain. This
ensures that you'll generate a new box for every fragment created by a
region break. These overflow:fragment boxes can either be auto-sized or a
fixed size. It's a complete solution to matching a region chain to the
named flow content.

One response to this use case is the notion that all of the boxes could be
generated and styled using the ::nth-fragment() pseudo-element. This is
true for some basic cases, but taking named flows out of the equation has
some big disadvantages:

1. All of the boxes need to be siblings
2. Styling has to use pseudo-elements versus classes and ids
3. JavaScript access is limited

So my point here is that if you use named flows, overflow:fragments can be
a useful overflow setting for the end of your region chain. I'll go into
other interactions in separate posts coming soon.


Received on Monday, 7 October 2013 01:23:52 UTC

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