W3C home > Mailing lists > Public > www-style@w3.org > May 2009

Re: [css3-layout] Nested templates and CSS rule order

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 7 May 2009 19:09:42 -0500
Message-ID: <dd0fbad0905071709q51b57c8icce31add9ce71968@mail.gmail.com>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:18 GMT