@@ -2469,18 +2469,19 @@ spec:css22; type:property; text:display
24692469
24702470 When fragmenting a table, user agents must attempt
24712471 to preserve the table rows unfragmented
2472- if their height is at least twice smaller than the table width.
2472+ if the cells spanning the row do not span any subsequent row, and
2473+ their height is at least twice smaller than both the fragmentainer height and width.
24732474 Other rows are said <dfn id="freely-fragmentable">freely fragmentable</dfn> .
24742475
24752476 When a table doesn't fit entirely in a fragmentainer,
2477+ at least one row did fit entirely in the fragmentainer,
24762478 and the first row that does not fit in the fragmentainer is not <a>freely fragmentable</a> .
24772479 the user agent has to insert some vertical gap
24782480 between the rows located before and at the overflow point
24792481 such that the two rows end up separated in sibling fragmentainers.
2480- Cells spanning across those two rows are
2481- divided into two fragments (one in each fragmentainer),
2482- whose height is kept equal to the rows they span in each of these fragments, and
2483- their content is fragmented among those two fragments, in parallel.
2482+ If the fragmentation requires repeating headers and footers, and the footer is repeated,
2483+ then the footer must come directly after the last row in the fragmentainer
2484+ and the vertical gap must be inserted after the repeated footer.
24842485
24852486 <figure>
24862487 <img src="./images/CSS-Tables-Fragmentation-1.svg" style="width:100%; max-width: 500px;" />
@@ -2489,10 +2490,10 @@ spec:css22; type:property; text:display
24892490
24902491 When there is no row fitting entirely in the current fragmentainer
24912492 or when the first row that does not fit in the fragmentainer is <a>freely fragmentable</a> ,
2492- user agents must split each cell of the row in two fragments (one in each fragmentainer)
2493- so that all fragments in the same fragmentainer continue to share the same height.
2494- Then, the user agent must fragment the content of each cell
2495- among its two fragments, in parallel .
2493+ user agents must attribute all the remaining height in the fragmentainer to the cells
2494+ of that row, and fit as much content as it can in each of the cells independently,
2495+ then break to the next fragment and start the content of each cell where it was stopped
2496+ in its previous fragment (top borders must not be repainted in continuation fragments) .
24962497
24972498 <figure>
24982499 <img src="./images/CSS-Tables-Fragmentation-2.svg" style="width:100%; max-width: 500px;" />
@@ -2501,21 +2502,30 @@ spec:css22; type:property; text:display
25012502
25022503 When 'break-before' or 'break-after' is applied
25032504 to a <a>table-row-grouping</a> or a <a>table-row</a> box,
2504- the user agent has to insert some horizontal gap
2505+ the user agent has to insert some vertical gap
25052506 between the rows located before and after the breaking point
25062507 such that the two rows end up separated in sibling fragmentainers
25072508 as required by the property value.
2509+ If the fragmentation requires repeating headers and footers, and the footer is repeated,
2510+ then the footer must come directly after the last row in the fragmentainer
2511+ and the vertical gap must be inserted after the repeated footer.
25082512
25092513 <!--——————————————————————————————————————————————————————————————————————————-->
25102514 <h3 id="repeated-headers">Repeating headers across pages</h3>
25112515
25122516 When rendering the document into a paged media,
2513- user agents must try to repeat
2517+ user agents must repeat
25142518 <a href="#table-header-group">header rows</a> and
25152519 <a href="#table-footer-group">footer rows</a>
2516- on each page spanned by a table
2517- where at least one header row or body row
2518- was considered to be a <a>content row</a> .
2520+ on each page spanned by a table
2521+ if the page is the table's fragmentainer,
2522+ if the header/footer has avoid 'break-inside' applied to it,
2523+ if the height required to do so is inferior to
2524+ two quarters of the page height
2525+ (up to one quarter for header rows, and
2526+ up to one quarter for footer rows), and
2527+ if that doesn't cause a row to be displayed twice
2528+ on that page.
25192529
25202530 When the header rows are being repeated, user agents must
25212531 leave room and if needed render the table top border.
@@ -2526,28 +2536,9 @@ spec:css22; type:property; text:display
25262536 <figcaption> Expected rendering of table with headers and footers fragmented across two pages</figcaption>
25272537 </figure>
25282538
2529- When doing so doesn't leave enough space to insert at least one <a>content row</a> ,
2530- users agents must drop the footer rows which are not content rows (possibly all of them).
2531-
2532- When doing so still doesn't leave enough space to insert at least one <a>content row</a> ,
2533- users agents must drop the header rows which are not content rows (possibly all of them).
2534-
2535-
2536- In a given fragmentainer, a table row is considered a <dfn>content row candidate</dfn> if
2537- it hasn't been included yet in a preceding fragmentainer where it was considered a content row
2538- (if no preceding fragmentainer exists, all table rows are considered content row candidates);
2539-
2540- In a given fragmentainer, a table row is considered a <dfn>content row</dfn> if it is in the set of
2541- all <a>content row candidate</a> s from the table header, if any;
2542- otherwise, all <a>content row candidate</a> s from the table bodies, if any;
2543- otherwise, all <a>content row candidate</a> s from the table footer, if any.
2544-
2545- User agents may consider all header rows and footer rows
2546- to form an unfragmentable block, to enable rendering the headers and footers the same way on each page.
2547-
25482539 <p class="advisement">
2549- User agents may decide to extend this behavior to every fragmentation context ,
2550- and not just to the main document's paging fragmentation context .
2540+ User agents may decide to extend this behavior to more fragmentation contexts ,
2541+ for instance repeat headers/rows across columns in addition to pages .
25512542 User-agents that are rendering static documents are more likely to adopt this behavior,
25522543 though this is not required per spec.
25532544
@@ -2833,6 +2824,7 @@ Using CSS Tables does not incur any privacy risk to mitigate.
28332824 col { display: table-column }
28342825 caption { display: table-caption }
28352826 table, thead, tbody, tfoot, tr, td, th, colgroup, col, caption { box-sizing: border-box; }
2827+ thead, tfoot { break-inside: avoid }
28362828
28372829<!--
28382830 Non-border built-ins
0 commit comments