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

[css3-regions] miscellaneous comments (mostly editorial)

From: Kang-Hao (Kenny) Lu <kanghaol@oupeng.com>
Date: Wed, 07 Nov 2012 05:10:19 +0800
Message-ID: <50997CBB.6070308@oupeng.com>
To: WWW Style <www-style@w3.org>
I have some fairly random editorial comments and some of them were
raised in the past:

  # 2.4. Regions flow breaking rules
  # The named flow content is positioned in the <dfn>current
  # region</dfn> until a natural or forced region break occurs, at
  # which point the next region in the region chain becomes the current
  # region.

This definition is only referenced once in the same sentence throughout
the document. Either the later occurrence of the term should link to
this or this <dfn> should be removed.

  # 3.1. The ‘flow-into’ property
  # flow-into
  # any element.
  # The ‘flow-into’ property does not apply to any pseudo-element
  # such as ::first-line, ::first-letter, ::before or ::after.

CSS 2.1 has a normative statement saying that ::before and ::after is
like a normal element and all occurrences of "Applies to: all elements"
in CSS 2.1 include ::before and ::after. So, the above looks
contradictory and I suggest we combine these two sentences into

  | All elements except ::first-line, ::first-letter, ::before or
  | ::after.

  # <ident>
  # The element is taken out of its parent's flow and placed into the
  # flow with the name ‘<ident>’.

This sentence, as well as the the restriction that 'flow-into' doesn't
apply to ::before and ::after, tricks me into thinking that 'flow-into'
might be element-level manipulation and a decendant element of 'display:
none' can show up in a CSS Region when set with 'flex-into'.

s/element/box/ might be better (Really?) but if this is too apparent to
other readers, I can retract this comment.

  # If an element has the same specified flow as one of its ancestors,
  # it becomes a sibling of its ancestor for the purpose of layout in
  # the region chain laying out content from that flow.

I don't like this sentence because "sibling" seems to be too broad here
(previous sibling? next sibling?) and there can be multiple ancestors in
the same named flow. Perhaps this sentence can be fold into

  # Elements in a named flow are sequenced in document order. The
  # structure of a named flow is equivalent to the result of moving the
  # elements to a common parent. The visual formatting model uses the
  # relationships between elements in the named flow structure as
  # input, rather than the elements’ original positions.

  # Note 3
  # table > * {flow-into: table-content} ...

I'd say this is a bad example, at least for authors. The fact that
descendant combinator is bad for 'flow-into' can be explained with a
case that's more common and doesn't involve anonymous table objects...

  # CSS Regions establish a new block formatting Context.
  # ...
  # Floats or other exclusions (see [CSS3-EXCLUSIONS]) potentially
  # impact the content laid out in region chains, just as for
  # non-regions.

As mentioned by fantasai[1], the part about float is contradictory.

  # 3.2.1. Cycle Detection
  # The dependency graph consists of edges such that:
  # * Every named flow depends on its elements where the value of
  # ‘flow-from’ computes to an <ident> .
  # ...


  # 3.5. The @region rule
  # The ‘@region’ rule consists of the keyword ‘@region’ followed
  # by a selector and a block of style rules.

Am I right that the block of style rules can't contain ::before and
::after? But I am not really getting the model, so..

  # Example 4
  # ...

I don't understand the picture. Why is there blue border under paragraph
p_1? Isn't div div_1 the parent element of both paragraph p_1 and
paragraph p_2? Is this what's supposed to happen if 'div {...}' is 'div
{ border: blue;}'? If so, please just expand 'div {...}'.

The remaining wording is just quite confusing and I can't tell if it's
the fragments or elements that match selectors.

  # 5.1. Processing model
  # The ‘display’ property of the ‘::after’ content can be set to
  # ‘run-in’ to align with the region's content's inline boxes. In
  # that case, the ‘::after’ content becomes the last inline box of
  # the previous element in the flow that has some visual rendering in
  # the region and can accommodate for the ‘::after’ box.

As mentioned by fantasai again[2], this isn't the behavior for 'run-in'.
Or is this a new behavior introduced by the spec?

  # If there is not enough room to accommodate the ::before content,
  # the ‘::after’ content after removing all flow fragment content,
  # or a combination of the two, then the ::before and/or ::after
  # content overflows.

s/overflows/overflows that region/?

(So that it's clear that ::after overflow doesn't go into the next region.)

  # 6.1. The NamedFlow interface
  # A named flow is created when it becomes referenced by the
  #‘flow-into’ and/or ‘flow-from’ computed values.

I'd suggest we remove all occurrences of "computed values" in this
chapter. Whether something becomes a CSS Region really is more complex
than the CSS 2.1 notion of computed values (when 'flex-from/into'
doesn't apply, when circular dependency happens.)

Also, this sentence duplicates the one in the definition:

  # A named flow is created when at least one element is moved into the
  # flow with the given identifier or when at least one CSS Region
  # requests content from that flow.

which seems to be better.

  # NULL: the user agent must return null.
  # CREATED: the user agent must return a valid NamedFlow instance.

Which attribute are these referring to?

  # interface NamedFlow : EventTarget
  # The <dfn>overset</dfn> attribute returns true if there are named
  # flow fragments that do not fit in the associated region chain. The
  # attribute also returns true if there is no associated region chain.
  # Otherwise, it returns false.
  # The <dfn>getRegions()</dfn> method returns the sequence of regions
  # in the region chain associated with the named flow. Note that the
  # returned values is a static sequence in document order.

While the description of 'overset' talks about the case when there is no
associated region chain, 'getRegions()' and 'firstEmptyRegionIndex'
don't. If I understand correctly, I think the conceptual model here is
that a NamedFlow always has an associated region chain. It just can be
empty. So I suggest,

 s/there is no associated region chain/there are no regions in the
region chain/

matching 'firstEmptyRegionIndex'.

  # If a script holds a reference to a NamedFlow instance that has
  # entered the NULL state, its attributes and methods should behave as
  # follows:
  # * the 'name' attribute returns its value as normal.
  # * the 'overset' attribute returns false.
  # ...

Isn't 'overset' the only case that the above description doesn't cover?
I think we can move this special case into the description of 'overset'
and get rid of this list as well as NULL/CREATED, if I am not
misunderstanding something.

  # interface Region
  # ‘fit’
  # The region's flow fragment content fits into the region's content
  # box. 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 content is
  # further fitted in subsequent regions.

I think you meant to say "last non-empty region" or something.
Otherwise, the last sentence doesn't seem to be correct if the last
region in the region chain is 'empty' and the preceding one if 'fit'.

  # Note that if there is no content in the named flow, all regions
  # associated with that named flow should have their regionOverset
  # attribute return ‘empty’.

I think "Note that" usually starts a non-normative sentence and this
sentence is normative.

  # 6.4. Region flow layout events
  # If region chain nesting occurs (the contents of a NamedFlow
  # contains regions for a different NamedFlow) then the
  # regionlayoutupdate event for the nested flow(s) must be dispatched
  # before the regionlayoutupdate event for the containing flow is
  # dispatched.

I think this should be rephrased into "nested regions" instead of nested
flows. (This is the only occurrence of the term "nested flow" in the
spec too).

  # 7.1. The Region Flow Content Box (RFBC)
  # The RFCB is a block container box with a <a>computed</a> ‘width’
  # of‘auto’ and a whose <a>used</a> ‘height’ is resolved as
  # detailed below.

The two <a>s link to the wrong thing.

[1] http://lists.w3.org/Archives/Public/www-style/2011Dec/0474
[2] http://lists.w3.org/Archives/Public/www-style/2011Dec/0479

Web Specialist, Oupeng Browser, Beijing
Try Oupeng: http://www.oupeng.com/
Received on Tuesday, 6 November 2012 21:10:54 UTC

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