User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:184.108.40.206) Gecko/20080201 Firefox/220.127.116.11 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:18.104.22.168) Gecko/20080201 Firefox/22.214.171.124 As is acknowledged in section "6.3.4. Default attribute values in DTDs" of the CSS3 Selectors specification default attributes are a problem. And so are any missing attributes in general (eg when looking for images without alt-attribute). So I propose a selector that matches when an attribute is missing: [!attribute] So you can finally find images with missing alt attributes easily :-) Reproducible: Always CSS3 Selectors (my addition!!!) 6. Simple selectors 6.3. Attribute selectors 6.3.1. Attribute presence and values selectors [!att] Represents an element without the att attribute. Examples: The following attribute selector represents an img element that is lacking an alt attribute: img[!alt]
These things should be proposed to the CSS working group not us, but as it happens what you are requesting already exists in CSS3 and was implemented in Mozilla 7 years ago.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 71647
Funny thing I missed the :not() selector. But when it comes to actually using CSS I think that it's more obvious to have a special negative as well.
You need to log in before you can comment on or make changes to this bug.