W3C home > Mailing lists > Public > www-style@w3.org > May 2011

Re: [css3-regions][css3-content] Explicit/Implicit, Named/Anonymous Regions

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 17 May 2011 11:28:05 -0700
Message-ID: <BANLkTi=TLHy_N7+ROEXYRQODv2sJueT0EQ@mail.gmail.com>
To: Christoph P├Ąper <christoph.paeper@crissov.de>
Cc: W3C style mailing list <www-style@w3.org>
I like this listing of options, particularly for Part 2.  Allow me to
boil it down into a more condensed form, for easier reading.

When dealing with named flows, there are several types of things we
can potentially style.

1. The region that is accepting a flow.
2. The elements in a particular flow.
3. The elements flowed into a particular region.
  3a. Elements that are entirely within a particular region.
  3b. The portions of elements that exist in a particular region.

I think that styling #1 is straightforward - the region is either an
element or a pseudoelement, and thus is part of the element-tree.  You
can select and style it as normal.  We don't need special @-rules for
this, as CSS already has good syntax for it.

Styling #2 also seems relatively straightforward and easy - the only
thing you have to resolve is where the flow-styles fit in the
specificity hierarchy.  Presumably they automatically win over the
ordinary styles applied to them via normal selectors.  This suggests
that it can be handled as another specificity zone inserted between
the style attribute and the author zone.

#3 is where it gets both complicated and interesting.  We definitely
have use-cases for it, which is the annoying part, as that means we
can't just ignore it.  ^_^

#3b can be handled by something like a ::lines-in(<flow>) pseudo,
similar to what Hyatt suggested - we just extend the existing
::first-line concept to be multiple lines.  ::first-line is hacky and
bad, but UAs at least know how to handle it at this point, so
::lines-in(<flow>) won't be any worse

#3a is a bit more difficult, as it runs into circularity issues worse
than ::first-line.  It's very easy for an element to be entirely
within a region before applying styles, and partially outside a region
afterwards.  I suggest that, unless we have a *very* compelling
use-case that can't be accomplished any other way, we skip trying to
make #3a work, and just go with #3b.  #3b should still allow the
use-cases I've seen, where text is styled differently in the first
region than in the later regions.

So, in summary, #1 should already be handled by CSS.  #2 is relatively
easy to patch in, but I'd like to see use-cases for it before we try
to do anything in this direction.  #3a is very hard to do, so I
suggest we skip it.  #3b is also hard, but no harder than ::first-line
is already, and it hits the use-cases I've seen, so I suggest we
pursue it.

Received on Tuesday, 17 May 2011 18:28:52 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:46 UTC