- 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>
* 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
abbreviation.
Received on Thursday, 26 February 2004 16:33:13 UTC