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
{{ message }}
Repository navigation
Under cssMode legacy, a descendant rule on a table part with an omitted end tag reaches the rows after it #630
With every </tr> written, C1 and C2 are black, as expected.
Likely cause
Not yet confirmed in the code. The index is correct: the stack of open elements (#533) closes the second row when the third <tr> starts, and #629 reads tr:nth-child from it. The fault looks to be in the legacy table cascade: the rules lifted at a row into CssManager::$tablecascadeCSS seem to be dropped only when that row's </tr> is read. A <tr> that implicitly ends the previous row would then leave them in place, so the third row's cells still match tr:nth-child(2) td.
Found while working on #629. Under the standard cascade from #535 the matcher decides this from the element stack, so the fix only has to cover the legacy cascade.
Update at e685435, now that #631 has added cssMode:
Legacy only. Under cssModestandard (the default) the matcher decides from the element stack, and C1 and C2 are black. Under 'cssMode' => \Mpdf\CssMode::LEGACY they are still red.
A second trigger in the same family. Leave out a </th> around a block in the thead, and the thead rules reach the body cells, again under legacy only:
"Body" is drawn red under legacy. Written with </th>, it is black. Both cases look like the legacy table cascade keeping a level's rules when an end tag is implied, not read.
changed the title [-]A descendant rule on a row with no end tag applies to the rows after it[/-][+]Under cssMode legacy, a descendant rule on a table part with an omitted end tag reaches the rows after it[/+]on Sep 30, 2026
Activity
jakejackson1 commentedon Sep 30, 2026
Update at e685435, now that #631 has added
cssMode:cssModestandard(the default) the matcher decides from the element stack, and C1 and C2 are black. Under'cssMode' => \Mpdf\CssMode::LEGACYthey are still red.</th>around a block in thethead, and thetheadrules reach the body cells, again under legacy only:"Body" is drawn red under legacy. Written with
</th>, it is black. Both cases look like the legacy table cascade keeping a level's rules when an end tag is implied, not read.[-]A descendant rule on a row with no end tag applies to the rows after it[/-][+]Under cssMode legacy, a descendant rule on a table part with an omitted end tag reaches the rows after it[/+]Close a table cell, row or row group whose end tag is left out where …