- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 7 May 2009 19:09:42 -0500
- To: Alexis Deveria <adeveria@gmail.com>
- Cc: www-style@w3.org
On Thu, May 7, 2009 at 10:32 AM, Alexis Deveria <adeveria@gmail.com> wrote: > ...it becomes less clear what the user agent should do. Since #nav is > a child of both body and #content, and both suggest the element is > flowed into their "a" slots, should it go into the #content template > (which is the nearest parent template element) or in the body template > (which is the latest rule to include the "a" slot) ?. Or are > template-positioned elements required to be defined after the template > element? This appears to be the case in all the spec examples, but I > don't see any wording that indicates that it is required. http://www.w3.org/TR/2009/WD-css3-layout-20090402/#template-ancestor An element only pays attention to its most recent ancestor with a template. Any ancestors further up the chain are completely ignored. Something to note is that this should apply even if an element specifies a position that's not in its template ancestor's template, but *is* in a previous ancestor's template. That is, if you swapped the two template for body and #content in your example, so body had slots abcd and content had only slots ab, then .news and .sports would flow into the @ slot, as their template ancestor doesn't have slots named "c" or "d" (even though <body> does). ~TJ
Received on Friday, 8 May 2009 00:10:18 UTC