You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[...] the table generates a principal block box called the table wrapper box that contains the table grid box itself and any caption boxes (in document order). The table grid box is a block-level box that contains the table’s internal table boxes.
and
The computed values of properties position, float, margin-*, top, right, bottom, and left on the table element are used on the table wrapper box and not the table grid box; all other values of non-inheritable properties are used on the table grid box and not the table wrapper box. (Where the table element’s values are not used on the table and table wrapper boxes, the initial values are used instead.)
Ladybird implements this. Based on these rules, the following happens for the #in-front element:
the table wrapper box has position: fixed and z-index: auto
the table grid box has position: static and z-index: 2.
And because z-index has no effect on elements with static position, it is effectively ignored causing the #in-front element to be rendered behind the #behind element.
I think this is a bug in the spec the z-index also needs to be in the list of properties that that are used on the wrapper box instead of the grid box. And sure enough, adding the property to the list of things that get moved fixes the test case and also solves the layout issues on the website where I reduced this from.
Consider the following testcase:
In Chrome and Firefox this produces a green square. In Ladybird the red square is displayed instead.
According to the spec the following applies for the
#in-front
element:and
Ladybird implements this. Based on these rules, the following happens for the
#in-front
element:position: fixed
andz-index: auto
position: static
andz-index: 2
.And because
z-index
has no effect on elements with static position, it is effectively ignored causing the#in-front
element to be rendered behind the#behind
element.I think this is a bug in the spec the
z-index
also needs to be in the list of properties that that are used on the wrapper box instead of the grid box. And sure enough, adding the property to the list of things that get moved fixes the test case and also solves the layout issues on the website where I reduced this from.(Originally posted here)
The text was updated successfully, but these errors were encountered: