W3C home > Mailing lists > Public > www-style@w3.org > April 2008

[CSS3] Attribute selectors

From: Alan Gresley <alan@css-class.com>
Date: Mon, 07 Apr 2008 00:45:56 +1000
Message-ID: <47F8E224.4040508@css-class.com>
To: www-style@w3.org

I didn't truly realize what I said about attributes selectors in my last 

I said that att=val, att~=val and att|=val limit the scope that an 
attribute presence and value selector will match a HTML attribute. All 
these selectors operate as delimiters.


Substring attribute selectors att^=val, att$~=val and att*=val operate 
more like concatenations.


A few words from this says....

For example, the strings "foo" and "bar" may be concatenated to give 

This could mean that "" equals the point of possible concatenations. I 
believe that these empty strings in substring attributes selectors 
should match nothing and everything.

I see a use case.

[att="a"] {..}
[att="b"] {..}
div#x [att*=""] {..}

The last ruleset properties and values would be used for any element 
nested in "x" div. I could use also.


which matches in some cases.


I see use cases involving cascadence and specificity coming into play. 
None of this has been fully explored. Just some thoughts.


Received on Sunday, 6 April 2008 14:47:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:04 GMT