W3C home > Mailing lists > Public > www-style@w3.org > December 2011

Re: [css3-layout] A shortcut with numbers instead of letters in a template

From: Anton Prowse <prowse@moonhenge.net>
Date: Sat, 03 Dec 2011 19:33:12 +0100
Message-ID: <4EDA6B68.1020900@moonhenge.net>
To: www-style@w3.org
CC: "Tab Atkins Jr." <jackalmage@gmail.com>
On 03/12/2011 19:08, Tab Atkins Jr. wrote:
> On Sat, Dec 3, 2011 at 1:02 AM, Anton Prowse<prowse@moonhenge.net>  wrote:
>> I can see why authors would find the shorthand attractive.  However, I don't
>> like the fact that when inspecting an element's position property it's not
>> possible to know whether the element participates in template layout or not
>> (because the value is 'auto').  (Does CSS have other examples of an element
>> being pulled into some layout context without that fact being possible to
>> deduce just from inspecting the element?) One way of solving that would be
>> to give such template elements a new keyword value of the 'position'
>> property, eg position:template,
>
> Yes, both Flexbox and Grid require you to inspect the parent to know
> what the child's layout context is, at least in some situations.

Good to know, thanks.

> Requiring "position:template" doesn't get you much over just requiring
> "position: 1".

True, if the 'position' property is going to be set internally (without 
the author specifying it explicitly) then I guess "position:1" could be 
used.  Of course, that does tie the numbers 1-9 to template positioning 
in addition to all the letters.  (Template positioning is pretty greedy!)

Out of interest, might there be a useful identifying value or values 
that 'position' could be set to internally in the cases you mention of 
Flexbox and Grid?  (I plan to get better acquainted with those modules 
very soon.  It feels like they've been on my to-do list forever :-(.)

Cheers,
Anton Prowse
http://dev.moonhenge.net
Received on Saturday, 3 December 2011 18:33:42 GMT

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