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

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 UTC