W3C home > Mailing lists > Public > www-style@w3.org > March 1999

Wildcard selectors (Was: a simple question)

From: Ian Hickson <py8ieh@bath.ac.uk>
Date: Wed, 10 Mar 1999 14:17:59 +0000 (BST)
To: gordon <gordon@quartz.gly.fsu.edu>
cc: www-style <www-style@w3.org>
Message-ID: <Pine.GSO.4.04.9903101407140.25358-100000@midge.bath.ac.uk>
On Wed, 10 Mar 1999, gordon wrote:

> A nice addition to the specification would be a wildcard with which to
> override [especially unknown] pseudo-class selectors.

Yes - particularly good would be regexp selectors for selecting by element
name and attribute value. 

As in:

  /H[1-6]/ { 
             font-weight: bolder; 

  A[href/="^http://.*"] { 
             padding-right: 16px;
             background-image: url(offsite.png);
             background-position: center right;  

  [class/=".+"] { 
             font: inherit ! important;
	     color: inherit ! important;
	     background: inherit ! important;
	     margin: inherit ! important;
	     padding: inherit ! important;
	     border: inherit ! important; 

Where "/" is used to indicate a regexp search, and where the
background-position property is allowed to apply to inline elements.

(The first makes all headers bolder. The second adds an icon to
absolute links (presumably offsite ones). The third removes many of
the most visible properties on any elements with a class.)

Ian Hickson 
U+2642 U+2651
U+262E U+2603 U+263A
Received on Wednesday, 10 March 1999 09:18:09 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:49 UTC