[csswg-drafts] [css-tables] Do anonymous table-column-group and table-column boxes get created for tables that don't have any?

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

== [css-tables] Do anonymous table-column-group and table-column boxes get created for tables that don't have any? ==
Looking at https://drafts.csswg.org/css-tables-3/ it's not clear what the behavior of this testcase should be:

    <table style="visibility: collapse">
      <tbody style="visibility: visible">
        <tr>
          <td>
            Some text
          </td>
        </tr>
      </tbody>
    </table>
    <script>
      alert(document.querySelector("td").offsetWidth);
    </script>

Does this table have an anonymous table column group that inherits the "collapse" visibility style (in which case 0 should maybe be alerted)?  Or is there no table column group here at all, and the width should be the width of the text in the cell?

Firefox seems to implement the former behavior (0 is alerted).  Chrome and Safari have no support for `visibility: collapse` on table-column-group boxes at all, so alert the width of the text, but they do that even if I add an explicit `<colgroup>`, and show the text, in which case it seems clearly wrong.  

Edge alerts the width of the text, but it does that even if there's an explicit `<colgroup>`, even though in that case it doesn't show the text.  I'm not sure whether that's the right behavior or not,  In any case, in the testcase above in Edge the text _is_ shown, which means edge doesn't create an anonymous column-group box, or at least doesn't inherit visibility into it...

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

Received on Tuesday, 29 August 2017 03:56:50 UTC