RE: [css-tables] repeating table headers and footers

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

RE: [css-tables] repeating table headers and footers

Greg Whitworth
> Hi Greg,
>
> Does the mail I am replying to count as filing the issue of repeated table
> headers / footers against your new table spec, or do you want me to file it
> again separately?
>
>  - Florian

Yes this is fine, I'm pushing up an issue page right now and yours in the only one that I've pulled from comments at the moment. That said, I'll reply below with what we discussed in person to your suggestions below for archiving.

>
> > On Jan 20, 2016, at 22:21, Florian Rivoal <[hidden email]> wrote:
> >
> > When a table is fragmented over several fragmentainers (pages,
> columns...) should table headers and footers be repeated?
> >
> > CSS2.1 is the only spec I know of to speak about this[1], and it doesn't
> actually decide:
> >
> >> Print user agents may repeat header rows on each page spanned by a
> table.
> >
> >> Print user agents may repeat footer rows on each page spanned by a
> table.
> >
> > First, I don't think we behavior should depend on categories of UAs (print
> vs non print).
> >
> > Second, this is not clear whether this should also apply to fragmentainers
> other than pages, introduced after CSS2.1.
> >
> > And last, I am not too happy about this being up to the UA. If anyone, it
> feels like something that should be up to the author.
> >
> > As far as I can tell, today:
> > * Firefox, IE, and many print oriented formatters do repeat the
> headers/footers on page breaks
> > * Webkit, Blink, and Vivliostyle don't (but we're considering switching).
> > * Some print formatters also repeat on column breaks.

Francois and I will add a new section and test for this under table fragmentation.

> > As browsers are inconsistent with eachother, I doubt we have a web
> compat problem. Since repeating table headers and footers on a
> fragmentation break is generally a useful thing, I suggest we make a
> normative requirement and say that UAs must repeat header/footer rows
> when a table spans a break.
> >
> > To make sure layout does make progress even if fragmentainers are too
> small, we should probably also add an exception allowing header rows (resp.
> footer rows) to be skipped in the non first (resp. non last) fragmentainers if
> there isn't enough space for normal rows otherwise.
> >
> > Finally, since authors may sometimes want the other way around, it would
> make sense to have a property to turn this off. We could model it after
> XSL[2][3]:
> >  table-omit-footer-at-break: true | false
> >  table-omit-header-at-break: true | false
> >  Initial: false
> >  Inherited: no
> >
> > Maybe renaming the values to do better than true and false:
> >
> >  table-omit-*-at-break: always | avoid
> >
> > And maybe extending it for various kinds of breaks:
> >
> >  table-omit-*-at-break: always | [ page || column || region ] | avoid
> >
> > Or maybe if we don't like double negatives ("avoid omitting" isn't great), do
> something like that:
> >
> >  table-repeat-*-at-break: repeat | no-repeat
> >  table-repeat-*-at-break: repeat [ page || column || region ]? | no-repeat
> >
> > Or some other bikesheding.

We currently do **not** want to add any additional feature to the current specification. The reason for this is our first goal is to have a foundational specification that any UA can go and fix bugs against. At the point that we feel we have a stable table specification and this is on its way to CR, we'll consider features for L4.

> > Yet another alternative would be to have one property instead of two, and
> rely on selectors to select headers or footers.
> >
> > And we could possibly make that single property apply to regular table row
> groups in addition to table header groups and table footer groups, and have
> the initial value be auto, which computes to repeat on header and footer
> groups, and to no-repeat on regular table row groups.
> >
> > Or some other variation.
> >
> > Summary:
> >
> > 1) Can we agree table headers and footers must be repeated by default
> when the table spans a fragmentation break?

We'll test this and spec the most interoperable behavior, and if there is none we'll spec the most sane behavior that is currently being shipped by a UA (to ease on web compat).

> > 2) Can we have a property to switch that off if authors so desire?
> > 3) How do we design that property?

Not in the current spec, see longer statement above.


> >
> > - Florian

Reply | Threaded
Open this post in threaded view
|

Re: [css-tables] repeating table headers and footers

Florian Rivoal-4

> On Feb 7, 2016, at 16:09, Greg Whitworth <[hidden email]> wrote:
>
>> Hi Greg,
>>
>> Does the mail I am replying to count as filing the issue of repeated table
>> headers / footers against your new table spec, or do you want me to file it
>> again separately?
>>
>> - Florian
>
> Yes this is fine, I'm pushing up an issue page right now and yours in the only one that I've pulled from comments at the moment. That said, I'll reply below with what we discussed in person to your suggestions below for archiving.

Thanks.

>>> On Jan 20, 2016, at 22:21, Florian Rivoal <[hidden email]> wrote:
>>>
>>> When a table is fragmented over several fragmentainers (pages,
>>> columns...) should table headers and footers be repeated?
>>>
>
> Francois and I will add a new section and test for this under table fragmentation.

Thanks.

> We currently do **not** want to add any additional feature to the current specification. The reason for this is our first goal is to have a foundational specification that any UA can go and fix bugs against. At the point that we feel we have a stable table specification and this is on its way to CR, we'll consider features for L4.

Understandable. I think the switch could be useful, but it is certainly not critical, and the interop work you're taking on is absolutely more important.

>>> Yet another alternative would be to have one property instead of two, and
>> rely on selectors to select headers or footers.
>>>
>>> And we could possibly make that single property apply to regular table row
>> groups in addition to table header groups and table footer groups, and have
>> the initial value be auto, which computes to repeat on header and footer
>> groups, and to no-repeat on regular table row groups.
>>>
>>> Or some other variation.
>>>
>>> Summary:
>>>
>>> 1) Can we agree table headers and footers must be repeated by default
>> when the table spans a fragmentation break?
>
> We'll test this and spec the most interoperable behavior, and if there is none we'll spec the most sane behavior that is currently being shipped by a UA (to ease on web compat).

I believe you'll find that repeating the table headers/footers across fragmentainers is not universally interoperable, but is the most commonly implemented behavior (especially if you take pagination-focused UAs into account as well) and the sanest / most useful.

If you come to a different conclusion, we'll have something to talk about.

 - Florian
Reply | Threaded
Open this post in threaded view
|

RE: [css-tables] repeating table headers and footers

Francois Remy-3
> > We'll test this and spec the most interoperable behavior, and if there
is
> none we'll spec the most sane behavior that is currently being shipped by
a

> UA (to ease on web compat).
>
> I believe you'll find that repeating the table headers/footers across
> fragmentainers is not universally interoperable, but is the most commonly
> implemented behavior (especially if you take pagination-focused UAs into
> account as well) and the sanest / most useful.
>
> If you come to a different conclusion, we'll have something to talk about.
>
>  - Florian

>From what I have seen, browsers do not repeat headers/footers in
multi-columns.
http://codepen.io/FremyCompany/pen/YwbOMM

I added some placeholder in the spec, feel free to provide alternatives:
https://drafts.csswg.org/css-tables-3/#fragmentation

Reply | Threaded
Open this post in threaded view
|

Re: [css-tables] repeating table headers and footers

Florian Rivoal-4

> On Feb 20, 2016, at 05:14, Francois Remy <[hidden email]> wrote:
>
> I added some placeholder in the spec, feel free to provide alternatives:
> https://drafts.csswg.org/css-tables-3/#fragmentation

As far as pages are concerned, the spec text seems like a good start to me, but I'd suggest switching from SHOULD to MUST. For pretty much everything in the table spec we should strive for MUST.

> From what I have seen, browsers do not repeat headers/footers in
> multi-columns.
> http://codepen.io/FremyCompany/pen/YwbOMM


For multicol, as far as I can tell:
- IE+Edge / Chrome / Safari don't repeat
- Print formatters do repeat (Vivliostyle doesn't as of now, but we're planning to, unless this discussion convinces us it's a bad idea).
- Firefox doesn't count, since it doesn't fragment tables across columns at all.

CSS Regions don't have enough implementations to be worth looking at what
"everybody" does when fragmenting tables there.

Despite the current lack of browser support for repeating table headers/footers in multicol, I'd argue the spec still should ask for repetition everywhere:
 - I don't think the distinction between different types of fragmentainers is justified
 - Multicol usage on the web is still low enough that I don't expect compat problems
 - Multicol in paged media is used more often, and UAs focused on paged media do repeat.
 - Minimizing the difference between "CSS for print" and "CSS for screen" is good.

Florian
Reply | Threaded
Open this post in threaded view
|

RE: [css-tables] repeating table headers and footers

Francois Remy-2
> > I added some placeholder in the spec, feel free to provide alternatives:
> > https://drafts.csswg.org/css-tables-3/#fragmentation
>
> As far as pages are concerned, the spec text seems like a good start to me,
> but I'd suggest switching from SHOULD to MUST. For pretty much everything
> in the table spec we should strive for MUST.

Good call. Greg and I will update to MUST.


> > From what I have seen, browsers do not repeat headers/footers in
> > multi-columns.
> > http://codepen.io/FremyCompany/pen/YwbOMM
>
>
> For multicol, as far as I can tell:
> - IE+Edge / Chrome / Safari don't repeat
> - Print formatters do repeat (Vivliostyle doesn't as of now, but we're planning
> to, unless this discussion convinces us it's a bad idea).
> - Firefox doesn't count, since it doesn't fragment tables across columns at all.
>
> CSS Regions don't have enough implementations to be worth looking at what
> "everybody" does when fragmenting tables there.
>
> Despite the current lack of browser support for repeating table
> headers/footers in multicol, I'd argue the spec still should ask for repetition
> everywhere:
>  - I don't think the distinction between different types of fragmentainers is
> justified
>  - Multicol usage on the web is still low enough that I don't expect compat
> problems
>  - Multicol in paged media is used more often, and UAs focused on paged
> media do repeat.
>  - Minimizing the difference between "CSS for print" and "CSS for screen" is
> good.

Given no browser does it, I feel pretty confident we should not put that in the spec.

I see some value in repeating the headers, and that seems reasonably easy to do when fragmentainers have the same width, acceptably difficult when they don't. However, I am pretty confident repeating footers is both difficult to implement and not very useful in non-page mode; correct me if I am wrong but I have the impression footers are more-often-than-not used for sums (which have little value in being repeated) or to have a bottom-copy of the header (which is relatively fine to skip it if we repeated the headers already).

I think we should raise the issue in a table-spec-breakout session in the future, with the following options:
- Statu quo (repeating does not have to occur in non-page fragmentainers)
- User agents may repeat headers and/or footers when fragmenting
- User agents should repeat headers when fragmenting
- User agents should repeat headers and footers when fragmenting

Anything beyond "should" makes me uncomfortable. I am personally leaning towards 1 and 3.

Reply | Threaded
Open this post in threaded view
|

Re: [css-tables] repeating table headers and footers

Florian Rivoal-4

> On Feb 23, 2016, at 03:00, Francois Remy <[hidden email]> wrote:
>
>>> From what I have seen, browsers do not repeat headers/footers in
>>> multi-columns.
>>> http://codepen.io/FremyCompany/pen/YwbOMM
>>
>>
>> For multicol, as far as I can tell:
>> - IE+Edge / Chrome / Safari don't repeat
>> - Print formatters do repeat (Vivliostyle doesn't as of now, but we're planning
>> to, unless this discussion convinces us it's a bad idea).
>> - Firefox doesn't count, since it doesn't fragment tables across columns at all.
>>
>> CSS Regions don't have enough implementations to be worth looking at what
>> "everybody" does when fragmenting tables there.
>>
>> Despite the current lack of browser support for repeating table
>> headers/footers in multicol, I'd argue the spec still should ask for repetition
>> everywhere:
>> - I don't think the distinction between different types of fragmentainers is
>> justified
>> - Multicol usage on the web is still low enough that I don't expect compat
>> problems
>> - Multicol in paged media is used more often, and UAs focused on paged
>> media do repeat.
>> - Minimizing the difference between "CSS for print" and "CSS for screen" is
>> good.
>
> Given no browser does it, I feel pretty confident we should not put that in the spec.
> [...]
> I think we should raise the issue in a table-spec-breakout session in the future, with the following options:
> - Statu quo (repeating does not have to occur in non-page fragmentainers)
> - User agents may repeat headers and/or footers when fragmenting
> - User agents should repeat headers when fragmenting
> - User agents should repeat headers and footers when fragmenting
>
> Anything beyond "should" makes me uncomfortable. I am personally leaning towards 1 and 3.

CSS is not just for browsers (even if they are obviously the dominant force), and if you broaden the UAs you consider, the "none of them does it" is no longer true.

Despite no browser doing it, I don't think we'd have a compat problem. Tables with thead and tfoot elements, especially when they are being nested in a multi-col, are extremely unlikely to be tables-for-layout, and almost certainly actual tabular content. When tables are being used for layout, preserving the current behavior, no matter how insane, is important. For actual tabular data, "doing the right thing" is worth at least considering.

In part due to browser bugginess, in part because the usability of multicol in scrolled media being tricky, multicol usage on the web is fairly low. If you throw in the fact that firefox never fragments tables in multicol at all, I'd expect that usage of tables, with thead and/or tfoot, in multicol, on the web, is somewhere between marginal and non existent.

So, if we required repeating in multicol, I don't think we'd be breaking anything, nor do I think that browser's behavior is particularly reliable to indicate desired behavior.

On the other hand, pdf formatters are used to generate things like catalogs, corporate reports, scientific  articles, and so on, all of which tend to both use tables and multicol. This both represents a body of content to be compatible with, and good evidence that this is the desired behavior.

Now, I do understand that browsers may not care to prioritize this very much, and that we wouldn't want to hold back the table specification on this (though I don't think we're any where near exiting CR on this spec), so doing some process shenanigans (at-risk?) on this sounds fine to me, but if it is the right behavior, and requiring it wouldn't cause breakage, I'm not too comfortable with not specifying it.

 - Florian
Reply | Threaded
Open this post in threaded view
|

Re: [css-tables] repeating table headers and footers

Robert Hogan

Just FYI, we're adding repeating table header/footer support for printed pages to Blink.


We're using break-inside: avoid; on the thead as a way of specifying it in the user agent's style.


On Tue, Feb 23, 2016 at 9:30 AM Florian Rivoal <[hidden email]> wrote:

> On Feb 23, 2016, at 03:00, Francois Remy <[hidden email]> wrote:
>
>>> From what I have seen, browsers do not repeat headers/footers in
>>> multi-columns.
>>> http://codepen.io/FremyCompany/pen/YwbOMM
>>

Reply | Threaded
Open this post in threaded view
|

RE: [css-tables] repeating table headers and footers

Francois Remy-2

Thanks for the heads up!

 

After reading the thread, I am not totally sure what the break-inside:avoid toggle you implemented does in practice.

 

Are you saying that if the table starts at the very bottom of the page, and that the header of the table does not fit entirely, has “break-inside: allow” and is therefore broken into two pieces, you won’t be able to repeat it in the next pages because it won’t form one single box?

 

If I understood correctly, I infer the two changes you want to see in the spec are:

 

-          In the HTML to CSS mapping, add “thead,tfoot { break-inside:avoid }”

-          In the fragmentation prose, allow not to repeat the header if it consists in more than one fragment

 

What about the cases where the table is defined by using “div { display: table-header-group }” ? Wouldn’t it be easier to just add an advisement saying that break-inside always computes to avoid when display computes to table-header-group and table-footer-group?

 

This seems to be the Edge behavior in this case, right?

 

 

From: Robert Hogan [mailto:[hidden email]]
Sent: Friday 10 June 2016 11:16
To: Florian Rivoal <[hidden email]>; Francois Remy <[hidden email]>
Cc: Greg Whitworth <[hidden email]>; CSS public list <[hidden email]>
Subject: Re: [css-tables] repeating table headers and footers

 


Just FYI, we're adding repeating table header/footer support for printed pages to Blink.

 

 

We're using break-inside: avoid; on the thead as a way of specifying it in the user agent's style.

 

 

On Tue, Feb 23, 2016 at 9:30 AM Florian Rivoal <[hidden email]> wrote:


> On Feb 23, 2016, at 03:00, Francois Remy <[hidden email]> wrote:
>
>>> From what I have seen, browsers do not repeat headers/footers in
>>> multi-columns.
>>> http://codepen.io/FremyCompany/pen/YwbOMM
>>