Re: [css3-page] page counters and scope

On Thu, 2009-04-23 at 21:40 -0700, Andrew Fedoniouk wrote:
> fantasai wrote:
> > Andrew Fedoniouk wrote:
> >>
> >> This discussion reminded me one problem I wanted to ask while ago.
> >>
> >> Are there any plans to support not only counters() but some
> >> other accumulators, for example "total of the page" kind of things?
> >>
> >> Sort of:
> >>
> >> @media printer
> >> {
> >>   td.total { content: page-sum-of( $(td.row-total):value ); }
> >> }
> >>
> >> with the markup:
> >>
> >> <tfoot>
> >>   <tr>...<td .total>(total on the page here)</td></tr>
> >> </tfoot>
> >>
> >> Or is this too much?
> > 
> > I think spreadsheet-like calculations are out-of-scope for CSS.
> 
> I haven't heard about any spreadsheet application capable to do 
> "totals-of-the-page".
The value of a cell which equals the sum of a whole other sheet is:
=SUM($Sheet1.$A$1:$AMJ$65536)
Or, at least, that works on OpenOffice.org Calc. I got that value by
clicking the corner cell, which selects all cells in a table. Would be
nice if I could just use $Sheet1, but it doesn't work like that.
> 
> > 
> > However, there are some proposals for more functionality from
> > counters, e.g. the target-counter() function
> >   http://dev.w3.org/csswg/css3-gcpm/#cross-references
> > and I think there was one for a last-count() or max-count()
> > function to grab the highest counter value.
> >   http://lists.w3.org/Archives/Public/www-style/2007Oct/0103.html
> > 
> 
> I do not understand how sum() is in principle different from count().
> First one is a += b; and second is a += 1;
> 
> The problem is that printing is not that media where JS even exists.
> 
> Anyway thanks.
> 
> > ~fantasai
> > 
> 

Received on Friday, 24 April 2009 21:34:14 UTC