W3C home > Mailing lists > Public > www-style@w3.org > July 2012

Re: [css3-flexbox] miscellaneous comments on Chapter 4. Flex Items

From: Anton Prowse <prowse@moonhenge.net>
Date: Fri, 27 Jul 2012 08:59:55 +0100
Message-ID: <50124A7B.7070902@moonhenge.net>
To: WWW Style <www-style@w3.org>
CC: Brad Kemper <brad.kemper@gmail.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, fantasai <fantasai.lists@inkedblade.net>, "Kang-Hao (Kenny) Lu" <kennyluck@csail.mit.edu>
On 26/07/2012 18:03, Brad Kemper wrote:
> On Jul 26, 2012, at 9:12 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
>
>> On Wed, Jul 25, 2012 at 11:59 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
>>> I find this pretty weird. 'order' can move something around in one
>>> dimension, and then absolutely positioning it in the other direction gives
>>> it a completely different placement for the dimension that stayed 'auto'?
>>> That is completely counterintuitive.

I think this is a mischaracterization.  Absolute positioning doesn't 
exist to control the other (z) dimension.  Practically, relative 
positioning exists for that, but I'd argue that even that was a mistake: 
'z-index' alone should have been able to control that, leaving relative 
positioning to focus entirely on its task of moving stuff about in the 
x-y plane relative to its static position.

Absolute positioning is a self-contained layout model which rivals other 
layout models such as block-based normal flow and flexbox.  It is not a 
priori obvious that properties/controls belonging to other layout models 
(float, order) should have any interaction or effect on abspos.

>>> Doesn't 'margin-left' combine with the 'left' property to affect where a
>>> left edge ends up, even if it is 'left:auto'? So should 'order' affect where
>>> an absolutely positioned flex box item end up, even if the edge-positioning
>>> values are all 'auto'.
>>
>> margin combines with t/r/b/l exactly as much as border and padding do,
>> because t/r/b/l position the margin box.
>
> I know why it works, from that mechanistic view. The end result is
> that properties like margin that move things around also tend to move
> around the abspos element, and it is unintuitive to have 'order' work
> so differently.

Like Tab, I don't see the analogy here.  I don't think one should think 
of margin as being about "moving stuff around".

> With float and clear, there is no reasonable or useful way to have
> them continue to interact the way they did with other elements once
> the item is positioned, since positioning causes it to stop affecting
> the space it takes up in the flow.

I disagree, actually.  I think it's a reasonable expectation that 
absposing a float or a clearing element give you a static position that 
matches where the element would have been if it were not abspos but were 
still floated or cleared.  But CSS21 says otherwise, so authors are 
taught not to expect that.

> But the same is not true for
> 'order'. It should maintain its relationship with the other elements,
> aside from the spacing and sizing and positions of the other elements
> being as though the item wasn't there.

But that would be inconsistent with float and clear.

I have to say that I'm on the fence about this issue.  I think it's 
reasonable to make a case for having 'order' affect abspos.  I'm just 
not convinced by the particular arguments you gave.

Cheers,
Anton Prowse
http://dev.moonhenge.net
Received on Friday, 27 July 2012 08:00:31 GMT

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