Re: Proposal: :column pseudo-class

Ian Hickson wrote:
>>>>The :column pseudo-class is effective on elements with display type 
>>>>table-cell or table-column or table-column-group only.
>>>
>>>The cascade happens before layout. You don't know an element's display 
>>>type at the time you are doing selector matching.
>>
>>Couldn't this problem simply be solved by removing the presentational
>>attributes "colspan" and "rowspan".
> 
> The problem exists independent of the existence of the attributes 
> "colspan" and "rowspan".
> 
> The problem is that a cell *is not a cell yet* when doing selector 
> matching. Short of doing selector matching twice (once for one set of 
> properties, and then again for another set, with a required layout pass in 
> between the two steps) you simply cannot have selectors that depend on 
> properties. And as I explained a few days ago, doing the two-pass selector 
> matching simply isn't an option, as it would be a performance nightmare.

For HTML this is "simple" because you have semantics defined for 
table, tr and td. But for a more generic case (which, AFAIK, CSS is 
targetting for) element semantics cannot be used to implement 
:column(). If colspan and rowspan cannot be implemented nicely with 
CSS then colspan and rowspan should be deprecated and a better 
method should be designed to achieve similar rendering of data.

That, or we need another pass before selector matching that attaches 
semantics to XML language of choice.

Perhaps such semantics definition could be applied in the same pass 
as layout if it will be separated from styling?

-- 
Mikko

Received on Tuesday, 5 July 2005 12:21:28 UTC