- From: Pascal Schmitt <pascal@cebra.nu>
- Date: Tue, 12 Apr 2005 09:03:13 +0000
- To: Bert Bos <bert@w3.org>
- Cc: www-style@w3.org
Hello!
>> My intention was not to /replace/ CSS with XPath but to enhance it.
>> Especially for generated-content, this would be helpful as there is
>> afaik no special CSS-Syntax yet (and you could use XPath 1:1 for
>> generated-content, couldn't you?)
>
> You'll have to explain that...
>
> The CSS selectors for generated content are :after and :before (and
> ::marker in CSS3 for the list marker).
Oh, I meant using XPath-Expressions for the "content" property, like
this:
table::after {
content: xpath("count(tbody/tr)") " lines";
}
Speaking of tables: there should be a CSS-Selector which enables me to
select cells by column without knowing its position:
Consider this table:
<table>
<col id="a" /><col id="b" /><col id="c" />
<tbody>
<tr><td>A</td><td>B</td><td>C</td></tr>
</tbody>
</table>
To give all cells in the "b"-column a blue background-color, one could
use CSS like that:
table > tbody > td+td { background-color: blue; }
But you have to know, which column (here: the 2.) it is.
table > tbody > td[ col(b) ] { background-color: blue; }
Would seperate the stylesheet from the content as you don't have to
know the column order.
--
Pascal Schmitt
Received on Wednesday, 13 April 2005 16:20:43 UTC