Re: [css-display] Refactoring 'display', got a crazy idea

On Fri, May 8, 2015 at 1:30 AM, Florian Rivoal <florian@rivoal.net> wrote:
>
>> On 08 May 2015, at 01:37, fantasai <fantasai.lists@inkedblade.net> wrote:
>>
>> On 05/07/2015 10:15 AM, Tab Atkins Jr. wrote:
>>> So, per a WG resolution from a while ago, I'm refactoring the Display
>>> module to drop 'display-inside/outside' and instead just extend
>>> 'display' to handle the things it allowed. While doing so, I realized
>>> my previous spec text was papering over an awkward hole, and I could
>>> fix that hole while solving a long-standing request at the same time.
>>> [...]
>>
>> To summarize what Tab was saying, the proposal is to have the 'display'
>> shorthand take the following syntax:
>>
>> display: none | [ <inside> || <outside> ] | <internal>
>>
>> where
>>
>>  <outside>  = block | inline | run-in ;
>>  <inside>   = flow | flow-root | table | flex | grid | ruby ;
>>  <internal> = table-row-group | etc.
>>
>> with the following equivalencies:
>>
>> block flow       => block
>> block flow-root  => BFC root
>> inline flow      => inline
>> inline flow-root => inline-block
>>
>> the idea being that "flow" indicates the contents might interact
>> with stuff from outside (this is true of both regular inlines and
>> regular blocks), while "flow-root" indicates establishing a new
>> formatting context.
>>
>> The term "flow" was taken from the HTML specs, where it indicates
>> a mix of inline and block content. This is consistent with how
>> CSS block containers accept a mix of inline and block content and
>> format them together.
>
> Thanks, I now understand it better than with Tab's mail. Overall
> I like it, but have a couple of questions:
>
> 1) What would "display: run-in flow-root" do?

What you'd expect - either produce an inline-block or a BFC, depending
on the run-in conditions.  (I need to review the run-in section to
make sure it works correctly with this stuff.)

> 2) Will we eventually allow things like "display: table-cell flex"
> (table-cell outside,flex inside) by promoting (some of) the values
> from <internal> to <outside>? Not asking you to predict the future,
> just if this design is meant to allow for that.

*Eventually*, yes, I plan for that to be possible.  Implementors
indicated they have no plans to do so in the near future, so we've
taken the possibility off the table.

> 3) Similarly, when we want to support a flex-item which is a table,
> we make a "flex-item" value, and have it as a display-outside?

No, we don't need that.  "table" is already an inside value; it works
just fine with flex items.

~TJ

Received on Friday, 8 May 2015 17:39:33 UTC