- From: Sebastian Zartner via GitHub <sysbot+gh@w3.org>
- Date: Sun, 30 Jun 2024 21:59:38 +0000
- To: public-css-archive@w3.org
> I'm not sure whether the duplication of the `<thead>` is currently magic or there is already a way to control that. > I have had a difficult time finding information about duplicated `<thead>`s. The [answer lies in the definition of the `table-header-group` value for `display` in the CSS 2 spec.](https://drafts.csswg.org/css2/#table-display): > Print user agents may repeat header rows on each page spanned by a table. > It was suggested to me that the problem could be solved with an nth fragment selector, but from what you wrote @SebastianZ are the duplicated`<thead>`s not fragments? [Fragments are defined as parts of a box](https://drafts.csswg.org/css-overflow-5/#fragment-overflow) in relation to overflow. The duplicated `<thead>`s don't fall under that definition as they are content duplications and not _parts_ of an element. Though the specs currently don't seem to have a more detailed definition of those duplicated contents as the one I quoted above. Though it looks like [issue 20 in the Overflow 5 Module](https://drafts.csswg.org/css-overflow-5/#issue-4d452eb2) is asking for a clarification on that. Though the spec. also currently says this: > Styling an `::nth-fragment()` pseudo-element with the `content` property has no effect; the computed value of content for the fragment box remains the same as the computed value of content for the element. So I see two options to cover the use case of changing the contents of `<thead>` elements for each page: 1. Define that the repeated header rows are (duplicated) fragment boxes. That would allow to target them via `::nth-fragment()`. At the same time, relax the definition of `::nth-fragment()` so that `content` _has_ an effect in this case. 2. Create a new pseudo-element specifically for this use case. The syntax of that element would be `An+B`, like for `::nth-fragment()` to target the nth duplicate. Sebastian -- GitHub Notification of comment by SebastianZ Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10493#issuecomment-2198770077 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 30 June 2024 21:59:39 UTC