[csswg-drafts] [css-display] Allow `table-caption <display-inside>`. (#3940)

fantasai has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-display] Allow `table-caption <display-inside>`. ==
It would be trivial to make `table-caption` a `<display-outside>` value. Should we do it?

Splitting out from @MatsPalmgren's comment in https://github.com/w3c/csswg-drafts/issues/3771: 

>> Random thought: maybe `marker` should be a `display` value rather than a `position` value.
>
> It should be a new [`<display-outside>`](https://drafts.csswg.org/css-display-3/#typedef-display-outside) value, or an _additional_ keyword, in that case. I think it would ruin this feature if you can't specify the marker's internal layout to be `grid` etc.  Compare `table-caption/cell`, which has severely limited layout because you can't specify a `<display-inside>` value.
>
> `::marker`, `table-caption`, `<legend>` and `<summary>` have a lot in common in this respect.  They are in-flow by default, but not quite, since they aren't flowed normally together with other children in the layout context.  Semantically, they're like a third variation of "flow" (besides in-flow, out-of-flow). I wonder if we should model them in the same way for that reason. Either through `<display-outside>` or a new property.  E.g.
>
> `<display-outside>  = block | inline | run-in`  **`| marker | caption | cell | legend | summary`**
>
> This would add a lot more power to authors to control the layout without having to add wrapper elements. E.g. `<caption>` would have `display: caption flow-root` by default, but you could also specify `<caption style="display: caption grid">` to display its children using Grid layout.
`legend | summary` allows an arbitrary child to be displayed as the rendered legend/summary in a fieldset/details element.
>
> (FYI, It would be trivial to support table captions/cells with internal grid/flex/table layout in Gecko. The only thing missing is some way to specify it in CSS.)

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3940 using your GitHub account

Received on Thursday, 16 May 2019 21:32:04 UTC