Re: [CSS21] table cells establishing pseudo-stacking contexts (was Re: [CSSWG] Minutes Telecon 2013-04-05)

On 04/06/2013 11:16 AM, L. David Baron wrote:
>
> However, if cells are pseudo-stacking contexts, then the background
> of a later cell can draw on top of the content of an earlier cell.
> This requires, in turn, defining exactly *which* of these table part
> backgrounds are part of the pseudo-stacking context established by
> the table cell.
>
> Combining these two makes me think that, in turn, if cells are to be
> pseudo-stacking contexts, then either:
>   (a) the backgrounds of all of the table parts except for the table
>       (i.e., column groups, columns, row groups, rows, and cells)
>       should be part of background layer in the pseudo-stacking
>       context established by the cell, or
>   (b) none of the backgrounds (not even the cell's) should be part of
>       the pseudo-stacking context established by the cell.
>
> I don't have a strong preference between these options.  However, I
> would be opposed to other options, such as including the table's
> background in the cell's pseudo-stacking context, or including the
> cell background but none of the other table part backgrounds,
> because I don't think these options fit with the existing model, and
> thus I think they would lead to extra implementation complexity and
> extra difficulty for authors who want to understand what's
> happening.

There's also the interesting interaction with collapsed table borders.
In the case of the collapsed model, you really want the borders to
belong to the table and not the cell; and if they belong to the table,
then so must the cell background, or else it draws over the cell's own
borders. Hence for collapsed tables, Model B makes the most sense--
the cell only owns its own content, and its borders and background both
belong to the table.

For separate borders model, however, I think Model A makes the most
sense, because you want the ability to transform a table cell with
its border and background.

So I think from an authoring perspective, it makes the most sense to
do model A for separate-border tables, and model B for collapsed-border
tables.

Note: IE actually does model A correctly for separate-border tables.
All browsers seem to paint backgrounds over borders for collapsed
tables, however. And from an authoring perspective, that seems quite
broken. So we have no sensible implementation of layering for collapsed
tables at all.

Toy: http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2237

~fantasai

Received on Wednesday, 1 May 2013 22:32:42 UTC