Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colspans broken when mixed with rowspans and placed at the end of a row #20164

Open
Manishearth opened this issue Mar 2, 2018 · 1 comment
Open
Labels
A-layout/table I-wrong An incorrect behaviour is observed.

Comments

@Manishearth
Copy link
Member

<table border>
    <tr><td rowspan=2>a</td><td>b</td><td colspan=2 >cd</td>  </tr>
    <tr>                    <td>b</td><td>c</td><td>d</td></tr>

</table>

gives

image

and

<table border>
    <tr><td>a</td><td>b</td><td>c</td><td>d</td></tr>
    <tr><td rowspan=2>a</td><td>b</td><td colspan=2 rowspan=2>cd</td>  </tr>
    <tr>                    <td>b</td></tr>
    <tr><td>a</td><td>b</td><td>c</td><td>d</td></tr>
</table>

gives

image

In both cases, the colspanning cell should span the widths of the cells below it, and the table should encompass all of it.

I can only seem to trigger this when the colspan is at the end of the row, and there needs to be a rowspan involved as well. Not sure what's going on here; I don't yet understand the colspan code.

I don't think this was affected by the rowspan changes; this is completely an inline-size thing
cc @mbrubeck

@Manishearth Manishearth added A-layout/table I-wrong An incorrect behaviour is observed. labels Mar 2, 2018
@Manishearth
Copy link
Member Author

Replacing this fixme with the code in the else branch fixes the first example, but not the second one (nor does doing the same for the other fixme).

Looks like we need to implement that recursive algorithm. Seems to be the "intermediate min-content width for span N (N > 1)" one in https://dbaron.org/css/intrinsic/ ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-layout/table I-wrong An incorrect behaviour is observed.
Projects
None yet
Development

No branches or pull requests

1 participant