W3C home > Mailing lists > Public > www-style@w3.org > February 2012

[css3-regions] spec notes

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Wed, 1 Feb 2012 02:46:42 +0000
To: Vincent Hardy <vhardy@adobe.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <D51C9E849DDD0D4EA38C2E539856928412E290CE@TK5EX14MBXC218.redmond.corp.microsoft.com>
I have a few notes on the spec. Mostly editorial, if there are issues for discussion I'll start separate threads.
2.3. Regions flow breaking rules

... regions are a predefined set of recipient boxes for the named flow content.

[am] I think we are defining regions as a lower-level primitive, so it is not correct to say that regions are "predefined". Something like "dynamic generation of regions is out of scope of this specification" would be closer.

4.1. The 'flow-into<http://dev.w3.org/csswg/css3-regions/#flow-into>' property

The edges of the first region in a region chain associated with a named flow establish the rectangle that is the initial containing block of the named flow.

[am] I am not sure if this is related, but would this definition of ICB have any effect on decisions about region stacking context (again excuse my ignorance on stacking context details)?

The first region defines the writing mode<http://www.w3.org/TR/css3-writing-modes/#writing-mode> for the entire flow. The writing mode on subsequent regions is ignored.

[am] Perhaps this should have some explanation, at least to understand where it would make a difference. My understanding is that it affects default direction of overflow, scrollbar placement (if some UAs) and if named flow was an anonymous block containing flow nodes, that would be writing mode of that anonymous block. Am I right? Is there a cleaner explanation of what it means?
Note 2
... However, the
table * {flow-into: table-content}
selector will move all the descendants of table elements in the 'table-content' named flow.

[am] perhaps this could show a more appropriate selector also. Maybe:
... However, the
table > * {flow-into: table-content}
selector will move all immediate children of all table elements into the 'table-content' named flow (which will usually result in merging rows of multiple tables, may be useful), but
table * {flow-into: table-content}
will move all descendants of table elements into the 'table-content' named flow, transforming element tree into a flat list in order of opening tags (which is probably not intentional).

[am] ...(just a suggestion, the example is OK as is).

4.2. The 'flow-from<http://dev.w3.org/csswg/css3-regions/#flow-from>' property
...if the element is part of the flow with name <ident>, then the element does not format any content visually.

[am] It seems this rule is protecting from recursive flows, but it also disallows some interesting uses, such as drop caps:

.story { flow-into:story; }

.dropcap { width:5em; height:5em; flow-from:story; }

@region .dropcap { font-size:500%; /*define wrap shape from text outline*/}

<div class=story>

  <div class=dropcap></div>

  Once upon a time...


[am] The spec already requires the UA to be smart enough to recognize the recursion here. Why not break the recursion in a way that doesn't drop the non-recursive content, or at least leave it undefined and see what gets implemented?

Example 3

In the following example, the inline content coming from the body_text named flow<http://dev.w3.org/csswg/css3-regions/#named-flow0> wraps around the #float box...

[am] I don't think that example adds anything non-obvious at this point. It probably did when it actually used exclusions, now it is just confusing - what is unusual about this example? Especially with no picture. I suggest removing the example.

4.3. Region flow break properties

...Note that there is no region break in the last region associated with a named flow.

[am] That note is out of sync with 'region-overflow' property.

The behavior of region breaks with regards to regions is identical to the behavior of page breaks with regards to pages, as defined in the [CSS21]<http://dev.w3.org/csswg/css3-regions/#CSS21>.

[am] I would expect this section to also define what how other break types are interpreted in regions, and does  even if they have no effect.

[am] For example, in a single-column region, does "break-inside:avoid-column" have any effect? Or should region-specific values ever have effect when not in a region?

4.4. The region-overflow property
Value: auto | break

[am] maybe also 'nobreak' value to explicitly create single-region flows? (see separate email)

4.5. The @region rule

[am] I think region styles should also support multicolumn properties. Channing width will already affect number of columns, so for implementation it will make very little difference.

Region styling does not apply to nested regions

[am] I agree that is the right default. Will it be possible though? It seems that if everything in a region is white on black, there should be a way to make nested regions also white on black.

[am] Are nested @region rules allowed?

6. CSSOM view and CSS regions
Note 7
Since an element may be split into multiple regions, invoking getClientRects<http://www.w3.org/TR/cssom-view/#dom-element-getclientrects> on it must return the list of rectangles for the element in all the regions it is part of.

[am] In what coordinate system are the rects? This question is related to elementFromPoint() and other OM for layout results. This section needs to either define how coordinates in fragmented layout or (better) refer to [css3-breaks]. I'll propose something to include here as part of elementFromPoint.

interface NamedFlow<http://dev.w3.org/csswg/css3-regions/#dom-namedflow> {

  readonly attribute boolean overflow<http://dev.w3.org/csswg/css3-regions/#dom-namedflow-overflow>;

  readonly attribute NodeList<http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-536297177> contentNodes;

  NodeList<http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-536297177> getRegionsByContentNode(Node<http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1950641247> node);



[am] there is an extra closing brace

[am] how settled are we on names here? I think "content" instead of "contentNode" and "getRegionsByContent" instead of "getRegionsByContentNode" would be more readable. And most DOM members don't have "Node" in their names, even if they take or return nodes (e.g. Node.children, Node.appendChild, etc.)...

6.2. Extension to the Element interface

The regionOverflow attribute can take one of the following values:

[am] can *have* ... values?
the region element's content overflows the region's content box<http://www.w3.org/TR/CSS21/box.html#box-dimensions>. Note that the region's overflow<http://www.w3.org/TR/CSS21/visufx.html#overflow> property value can be used to control the visibility of the overflowing content.

[am] This is not how I define 'overflow', or how IE implementation works. 'overflow' means that this region has content from the flow and it ends with a break. It doesn't make sense to relate it to the old 'overflow' property: content can visually overflow for many reasons (e.g. because it is too wide), while the main purpose of this property is to tell that there is more content for next region.

This means that the region is the last one in the region chain and not able to fit the remaining content from the named flow<http://dev.w3.org/csswg/css3-regions/#named-flow0>.

[am] it is possible to define that 'overflow' can only be returned for the last region, but then it would mean that the value for a given region will change while nothing is changing about the region itself.
[am] I propose this: formatting of content in this region ended with a break. There is more content available for next region. Regions with "region-overflow:nobreak" or last region with "region-overflow:auto" will never return this value.
the region element's content fits into the region's content box<http://www.w3.org/TR/CSS21/box.html#box-dimensions>. It does not overflow. If the region is the last one in the region chain, it means that the content fits without overflowing. If the region is not the last one in the region chain, that means the named flow<http://dev.w3.org/csswg/css3-regions/#named-flow0> content is further fitted in subsequent regions. In particular, in this last case, that means the region may have received no content from the named flow<http://dev.w3.org/csswg/css3-regions/#named-flow0> (for example if the region is too small to accommodate any content).
[am] see above. Proposed text: this region is not empty and formatting of contend was completed without a break (either because there is enough space or because "region-overflow" doesn't allow content breaking in this region
the region element has no content and is empty. All content from the named flow<http://dev.w3.org/csswg/css3-regions/#named-flow0> was fitted in regions with a lower document order.
[am] this is correct. Note: it should be defined what happens when there is no content at all. I think all regions should be 'empty' if there is no flow with that name, but if there is a flow and it has no content the first region should be 'fit'.
The element is not a region.

Received on Wednesday, 1 February 2012 02:48:02 UTC

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