- From: Dão Gottwald <dao@design-noir.de>
- Date: Mon, 30 Apr 2007 13:00:02 +0200
- To: Kornel Lesinski <kornel@geekhood.net>
- CC: schalk@alliedbridge.com, "public-html@w3.org" <public-html@w3.org>
Kornel Lesinski schrieb:
>
> On Sun, 29 Apr 2007 22:49:47 +0100, Schalk Neethling
> <schalk@alliedbridge.com> wrote:
>
>> In this regard why not have classes to identify each dt or li?
>>
>> <dl>
>> <dt class="dt-one">lorem</dt>
>> <dd class="dt-one">ipsum</dd>
>
> CSS3 already has selectors for this (:nth-of-type/:nth-child).
:nth-of-type alone doesn't help to select the definitions that belong to
a term. This would work:
<dl>
<dt>lorem</dt>
<dd>ipsum</dd>
<dt>dolor</dt>
<dd>sit</dd>
</dl>
dt:first-of-type ~ dd {
color: green;
}
dt:first-of-type ~ dt ~ dd {
color: inherit;
}
Far from ideal.
--Dao
Received on Monday, 30 April 2007 11:00:13 UTC