W3C home > Mailing lists > Public > www-style@w3.org > July 2005

Re: Proposal: :column pseudo-class

From: Laurens Holst <lholst@students.cs.uu.nl>
Date: Mon, 04 Jul 2005 17:40:44 +0200
Message-ID: <42C9587C.1080907@students.cs.uu.nl>
To: Orion Adrian <orion.adrian@gmail.com>
Cc: www-style@w3.org, www-html@w3.org

Orion Adrian wrote:

><tr><th>Location</th><th>Muscle Group</th><th>?</th><th>?</th>
><tr><td>Left Arm</td><td>Bicep</td><td>xxx</td><td>N</td></tr>
><tr><td>Left Arm</td><td>Tricep</td><td>yyy</td><td>N</td></tr>
><tr><td>Right Arm</td><td>Bicep</td><td>aaa</td><td>N</td></tr>
><tr><td>Right Arm</td><td>Tricep</td><td>bbb</td><td>N</td></tr>
>  
>
Let’s first establish that repetition is undesired, from an authoring 
point of view (both to save effort and for displaying purposes). This is 
something that colspan and rowspan are trying to resolve. Your example 
above nicely points out that there are two repetitions, in left/right 
arm, and in bicep/tricep, where only one could be caught using rowspan.

Rowspan also has the disadvantage that it isn’t really ‘friendly’ 
towards sorting... Although the sorting could consider rows which have 
rowspans as groups - something which would often be desirable anyway, 
but ah.

The issue could be resolved differently using e.g. the following 
label/input-based syntax:

<tr><th>Location</th><th>Muscle Group</th><th>?</th></tr>
<tr><td id="left">Left Arm</td><td id="bi">Bicep</td><td>xxx</td></tr>
<tr><td ref="left" /><td id="tri">Tricep</td><td>yyy</td></tr>
<tr><td id="right">Right Arm</td><td ref="bi" /><td>aaa</td></tr>
<tr><td ref="right" /><td ref="tri" /><td>bbb</td></tr>

Although that would be rather bothersome to author (you will have to 
create unique identifications for the table cells that get repeated), it 
would retain the actual ‘coupling’ of table cells, also when not 
adjacent and sorted.

In my opinion, it would give *more* semantic information, but that does 
not mean that colspan conveys no semantic information. It would also be 
better from a machine-processing point of view, but has a negative 
impact on authoring.

 From a more pragmatic point of view: HTML is what we have now. HTML is 
what we had. HTML is what people are used to. There likely already exist 
a ton of XML document languages which resolve the repetition ‘problem’ 
better than HTML does with col- and rowspan. Problem: those languages 
are not widely supported by user agents, nor are they widely used on the 
web.

So there you have it.

Anyways, this has little to do with CSS anymore (pointing to www-style 
cc). Note by the way that I looked through the CSS 2.0 and 2.1 table 
modules chapters, and nowhere did I find colspan and rowspan 
properties... Maybe I didn’t look well enough.


~Grauw

-- 
Ushiko-san! Kimi wa doushite, Ushiko-san!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laurens Holst, student, university of Utrecht, the Netherlands.
Website: www.grauw.nl. Backbase employee; www.backbase.com.
Received on Monday, 4 July 2005 15:40:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:39 GMT