- From: Brad Kemper <brkemper@comcast.net>
- Date: Thu, 15 Nov 2007 08:46:15 -0800
- To: Robert Miner <robertm@dessci.com>
- Cc: Bert Bos <bert@w3.org>, www-style Style <www-style@w3.org>
- Message-Id: <8970E270-48D2-457B-B5BA-3D244D8F5800@comcast.net>
On Nov 6, 2007, at 12:47 PM, Robert Miner wrote:
> 5. Content sensitive selectors
> Spacing between MathML operators as well as some stretching and sizing
> properties often depend on content of mo token elements (in
> accordance with
> operator dictionary). CSS3 had :contains() selector that could help
> us to
> define content sensitive formatting of token elements.
> Unfortunately this
> selector was removed, even so some CSS rendering engine support it
> (Prince XML
> formatter). It would be nice to restore property in some form.
Anyone know why it was removed? It does seem like it would be useful.
As would a content sensitive psuedo-element. Given this:
> Note: :contains() is a pseudo-class, not a pseudo-element. The
> following CSS rule applied to the HTML fragment above will not add
> a red background only to the word "Markup" but will add such a
> background to the whole paragraph.
>
> P:contains("Markup") { background-color : red }
It would be nice to have something like the following to, say, bold
all instances of my name in a document, without having to insert an
explicit span or B element into the HTML markup:
BODY::equals("Brad Kemper") { font-weight:bold; }
There are probably many use cases for such a pseudo-element, aside
from this frivolous example of my own name. So that instead of going
through a document highlighting or bolding every instance of a word
or phrase in the markup, you could just write a line into the CSS.
If such a thing existed, it might also be nice to match only the item
when it is within word boundaries, perhaps using regex notation:
BODY::equals("Brad Kemper",\b) { font-weight:bold; }
Received on Thursday, 15 November 2007 16:46:34 UTC