- From: L. David Baron <dbaron@dbaron.org>
- Date: Mon, 27 May 2013 18:07:02 +0800
- To: fantasai <fantasai.lists@inkedblade.net>
- Cc: www-style@w3.org
On Wednesday 2013-05-01 15:32 -0700, fantasai wrote: > 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 Some additions to my previous reply at: http://lists.w3.org/Archives/Public/www-style/2013May/0029.html Also: this testcase is unusual because it involves a real stacking context in the middle of the table: on the first cell, due to the transform. So I think Gecko's behavior there is correct and IE's is incorrect, at least if you assume that real stacking contexts within tables should in fact lead to proper separation of the things inside and outside the stacking context (as the table background painting code that you wrote does). And also: Do you have a testcase demonstrating drawing of backgrounds over borders? I haven't seen that. -David -- 𝄞 L. David Baron http://dbaron.org/ 𝄂 𝄢 Mozilla http://www.mozilla.org/ 𝄂
Received on Monday, 27 May 2013 10:07:32 UTC