[css-overflow][css-regions] Styles from fragment containers

Hey all (but particularly dbaron),

The recent discussion of styling left and right pages has made me think a
bit about fragments receiving styles from their containers. In CSS
Regions, there is only region styling that allows some special style rules
to match fragment content. Most of the styles applied to the container
only affect the container, not the fragment content.

CSS Overflow, on the other hand, has an additional way to style fragment
content. Section 5.1.2 [1] (particularly example 3) shows how styles set
on the fragment inherit through to the fragment content. I'm wondering
whether CSS Regions should take on this kind of fragment styling as well
(or perhaps we should define a general mechanism in a future CSS Break
module), but I have some questions on how it's intended to work.

Issue 23 says that the restrictions from styling inside fragments (5.1.3)
should apply to inheritance from fragments. Is the intent here to keep
properties like text-align from inheriting to the fragment content? One
bit of feedback we've gotten on CSS Regions is that it's surprising that
you can set text-align:center on a region container, but that doesn't have
an effect on the fragment flowing through the container. If I set
text-align:center in an ::nth-fragment() pseudo-element, should I expect
elements in the the fragment content to inherit that value?

If, as in example 3, I have a block container with bare inline content and
overflow:fragments, should I expect setting text-align:center in an
::nth-fragment() pseudo-element to have an effect on the layout of that
inline content? The question here is not inheritance, I think. The
fragment box itself has the value, which I'd expect should determine how
its inline content is laid out.

There's a paragraph about rules in an ::nth-fragment() pseudo-element
overriding declarations in rules without the pseudo-element. Is this just
the normal speficicity override (the pseudo-element gives more specificity
in otherwise identical selectors), or is this a more comprehensive
override? Given two selectors that match the same element - one with an
ID, and another with a class and an ::nth-fragment() pseudo-element, which
wins?

Thanks,

Alan

[1] http://dev.w3.org/csswg/css-overflow/#style-of-fragments

Received on Friday, 6 September 2013 20:43:09 UTC