Re: colspan and rowspan in xml + css?

On 2010-10-28 16:08, Tab Atkins Jr. wrote:
> On Tue, Oct 26, 2010 at 6:04 AM, Raffaello Giulietti
> <raffaello.giulietti@gmail.com> wrote:
>> I unsuccessfully tried to figure out a pure xml + css approach to
>> emulate html tables' colspan and rowspan.
>>
>> My sources of informations are the css 2.1 spec and HÃ¥kon and Bert's
>> book in its 3rd edition.
>>
>> Is it possible at all without resorting to x/html itself (with has its
>> own limits) or xsl (which is too complex for the context I'm working in)?
>> I've got the impression that I miss something really hard or really
>> trivial :-(
> 
> Unfortunately, no, you can't do rowspans or colspans in CSS right now.
>  It's a somewhat strange oversight in my opinion, but I don't know if
> there was a good reason at the time for it.
> 
> That's the sort of thing that would almost certainly be in a Table
> Layout module, once we write one.
> 
> ~TJ

Generally speking, spans are structural properties of a table. As such,
they should be specified on the structural side (whether xml or other)
rather than on the presentation side (css).

However, afaik, css is not able to "read" attribute values of the
structural side to use them for its own presentational duties.

Currently, the 2.1 spec allows the user agent to implement special
intelligence to "transmit" span values to css. This is how x/html table
spans actually work together with css, I guess. What is currently
missing is a more general mechanism for the other way round: letting css
get well-known attribute values in well-known contexts when it needs
them for presentational purposes.

Unfortunately, this sounds quite unsound and complex to do in a generic
setting and with the declarative nature of css.

Cheers
Raffaello Giulietti

Received on Thursday, 28 October 2010 16:51:32 UTC