- From: Peter Moulder <peter.moulder@monash.edu>
- Date: Wed, 30 Mar 2011 18:03:24 +1100
- To: www-style@w3.org
On Tue, Mar 29, 2011 at 07:44:19PM -0700, fantasai wrote: > We have three concepts in CSS that are used sometimes-interchangeably in CSS2.1. > They need distinct terminology, but I haven't been able to come up with a good > set. They are: > > element > Either a source document element or a pseudo-element. > > rendering tree thing > This is often referred to as a "box". Except for display: none elements, > which have none, and display: list-item elements, which have two, there > is only one "thing" per source document element. Regarding how we split things up: My understanding is that the tree that counters want to be defined by should exclude display:none source elements (and probably those descendants of display:table-column and display:table-column-group that CSS 2.1 section 17.2.1 says should be treated as if they had display:none; and possibly even display:table-column[-group] elements themselves for some interpretation of "rendered exactly as if they had display:none"); and should be affected by :before and :after, but should probably not be affected by any :first-line or :first-letter selectors. I believe counters aren't affected by 'float' and 'position' properties. (Note I haven't tested UA behaviour for most of what's in this paragraph, and I forget what CSS3 says on the matter.) Text defining selectors (when discussing what selectors/rulesets apply to, as distinct from for purposes of :first-child etc.) wants a term that includes source elements and all pseudo-elements, but without regard for display values, and without including anonymous elements/boxes. One possibility here would be to use a term like "subject" or "target" rather than an element-like term. conform.html in CSS2.1 defines "element" to mean "source document element". A number of specifications defer to CSS2.1 for the definitions in conform.html, so we ought to be careful in how we use the unqualified word "element". Text defining run-in (for css3-box) would prefer to define in terms of a tree that's not affected by :first-line or :first-letter. This is similar to what [I believe] the definition of counters wants, except that the run-in rules would want to use an "in-flow"-like qualifier. Is "gen-element [tree]" any good as a term for [a node in] the conceptual tree that includes the effects of :before and :after and display:none-like things and excludes the effects of :first-line and :first-letter and the splitting that results from bidi & line breaking? There are probably no absolute requirements for which effects are included in the tree referred to by which term: regardless of the choice (short of having a dozen slightly different terms), there will still be some need in the text for each effect, and each bit of text using phrases like "sibling", "parent", "child" etc., to be clear about how it's affected by other effects. (Where "effects" here means things that change parent/sibling relations: which in CSS 2.1 would include anonymous block box stuff, table-related manipulations, and list markers (especially inside markers), and arguably pagination; while e.g. css3-content has some other things.) pjrm.
Received on Wednesday, 30 March 2011 07:03:56 UTC