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

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

From: Brad Kemper <brad.kemper@gmail.com>
Date: Fri, 27 Jul 2012 08:26:28 -0700
Message-Id: <A231FB74-68DD-4C78-8427-7106C2B25848@gmail.com>
Cc: WWW Style <www-style@w3.org>, "Tab Atkins Jr." <jackalmage@gmail.com>, fantasai <fantasai.lists@inkedblade.net>, "Kang-Hao(Kenny) Lu" <kennyluck@csail.mit.edu>
To: Anton Prowse <prowse@moonhenge.net>
On Jul 27, 2012, at 12:59 AM, Anton Prowse <prowse@moonhenge.net> wrote:

> 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.

Right, so ignore z-index for this discussion, since it was a mistake, and has no bearing on the 2-dimensional movements we are talking about here.

> 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.

Saying that order is in another category (layout models) is not a convincing argument to me that it should not intuitively remain in effect. I'd want the same from grid; if an item is moved into a grid and then made abspos, I would not expect it's position in the grid to change unless top/bottom/left/right changed it.

>>>> 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".

Too late; I already do. Margin sets the distance between an element and it's neighbors, and thus moves it around (changes where it's border edges start, as surely as  t/r/b/l and order do). I don't know how you avoid having people think of it this way. 

>> 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.  

Yeah, I do not think that's reasonable. Not very much, anyway, on a scale of reasonableness.

> But CSS21 says otherwise, so authors are taught not to expect that.

OK, then, CSS21 and I both disagree with you on what is most reasonable for floats and clears. ;)

>> 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 disagree. If anything, float and clear are the exceptions, not the rule.

> 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.

Perhaps I have not articulated well enough why it feels unintuitive for 'order' not to affect abspos, but for me, at least, it is extremely unintuitive. 
Received on Friday, 27 July 2012 15:27:02 GMT

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