W3C home > Mailing lists > Public > www-style@w3.org > February 2004

Re: [css3] Determining the first occurence of an attribute value

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 26 Feb 2004 22:33:21 +0100
To: "Jens Meiert" <jens.meiert@erde3.com>
Cc: "W3C CSS" <www-style@w3.org>
Message-ID: <4062592d.345805582@smtp.bjoern.hoehrmann.de>

* Jens Meiert wrote:
>But the situation becomes ugly when he wants to extract the 'title' only
>once each abbreviation occurs, so he has (and that's AFAIR the only way to
>achieve the desired effect yet) to specify something like (media dependence
>assumed here, too):
>    acronym[title='World Wide Web Consortium']::after:first-child,
>    acronym[title='World Wide Web']::after:first-child,
>    abbr[title='Massachusetts']::after:first-child {
>    content: ' (' attr(title) ')';
>    }

Selectors do not allow to attach pseudo-classes to pseudo-elements...

>Are there already ways to solve this problem elegantly?

Yes, XPath,

  //abbr[not(preceding::abbr = .)]

Selects all abbr elements with a string value different from all
preceding abbr elements, i.e., only the first occurence of an
Received on Thursday, 26 February 2004 16:33:13 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:11 UTC