[CSS3] Attribute selectors

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 UTC