Re: [css-flexbox] element vs box

On 02/11/2014 08:13 PM, Peter Moulder wrote:
>    # If a box’s specified 'display' is 'inline-flex'
>    # and the box is floated or absolutely positioned,
>    # the computed value of 'display' is 'flex'.
>    # The table in CSS 2.1 Chapter 9.7 is thus amended [to say so].
>
> Could this bit be done in terms of elements?  At present, boxes are generated
> based on the computed value of 'display', so it's a bit strange to define the
> computed value of 'display' of a box that's already been generated.
>
> Further, "specified value" and "computed value" are terms usually associated
> with elements & pseudo-elements rather than boxes.  If we do retain this
> formulation, then I suggest being explicit about what the computed value of the
> element or pseudo-element corresponding to this box is, as that affects what
> display:inherit does.

OK, I've switched back that sentence to talk about elements.

> If it isn't done in terms of elements (and in particular, if this clause
> continues to leave the computed value of 'display' for elements as the same as
> the specified value), then I think the beginning of section 3 will need
> changing to say that the value of 'inline-flex' for an element generates either
> a block-level or inline-level flex container box depending on the values of
> 'float' and 'position' for that element.

I think I'm going to leave this one alone. It's technically a contradiction,
but I don't want to clutter the definitions with an obtuse exception that
is unlikely to confuse anyone if left out.

> What is the purpose of this clause, anyway?  I.e. what parts of CSS depend on
> the distinction between 'inline-flex' and 'flex' for the computed value of
> 'display' for a floated or abspos flex container box?

getComputedStyle and inheritance.

>> -For example, given two contiguous child elements with ''display:table-cell'',
>> +For example, given two contiguous child boxes with ''display:table-cell'',
>>   an anonymous table wrapper box around them becomes the <i>flex item</i>.
>
> This change makes the word "child" become strange (i.e. they won't actually be
> children of the flex container).  Because part of the purpose of the text
> around here is clarifying the transformation from elements to boxes, I think
> it's better to start off with "two contiguous child elements", and then change
> the second half to say "around their boxes".

Fixed.

> I haven't yet read the rest (I need to go now), but I think I'll send what I
> have now (hoping that the rest of what I read doesn't invalidate what I've just
> written).

Thanks for your review!

~fantasai

Received on Friday, 21 February 2014 00:46:35 UTC