Table's column not displaying properly
Categories
(Core :: Layout: Tables, defect)
Tracking
()
People
(Reporter: pierrick.alamartine, Unassigned)
Details
Attachments
(1 file)
|
569 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0
Steps to reproduce:
I reproduced the issue in jsfiddle here :
https://jsfiddle.net/rknofuby/3/
Actual results:
In the code you can see that the "display: hidden" property of the xfs_17 column affects the xfs_18 column and hides it as well.
Expected results:
In Chrome the column displays properly and the button inside it is shown.
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•5 years ago
|
||
Comment 3•5 years ago
|
||
It looks like the display: none on a table cell is causing it to be ignored in counting columns, so that the <col width="0"> that was intended to apply to the suppressed cell is instead applying to the next one.
Comment 4•5 years ago
|
||
So I guess the issue is about whether width on the cell should take priority over col width=""... Not clear to me it should but...
Comment 5•5 years ago
|
||
Isn't it primarily about which col width="" should apply to the second cell? According to https://drafts.csswg.org/css-display/#box-generation, regarding display: none,
Markup-based relationships, however, are not affected by these values, as they are solely rendering-time effects. For example, although they may affect which table cell appears in a column, they do not affect which table cell is associated with a particular column element.
So if I'm understanding correctly, the display: none property on the first cell (in the comment 2 testcase) should not affect the association of the second cell with the second col element, and so it should still have width=300.
Comment 6•5 years ago
|
||
Hmmm, fair. Though then how does it work with anonymous cells and such? That is handwavy at best.
Note that other browsers make the column zero-sized if you remove the explicit width on the cell, so they also seem to be using the box tree for this.
Description
•