W3C home > Mailing lists > Public > www-validator-css@w3.org > December 2015

attribute references for content and :read-only usage result in error

From: Hannes Sprafke <hsprafke@gmail.com>
Date: Fri, 11 Dec 2015 11:09:57 +0100
Message-ID: <CAH=c7WOoRbZVquG7xnjsE6S5fP4CoVkvQyqO8Q6Jr6ZYF=KoNQ@mail.gmail.com>
To: www-validator-css@w3.org
Hi,



I recently validated my freshly new written css with your validator on
http://jigsaw.w3.org/css-validator/ with the profile “css level 3” selected.

It showed some errors for my value for the attribute content which
references html attributes with attr(*someHtmlAttribute*).



Because of the description on
http://www.w3schools.com/cssref/pr_gen_content.asp I started some tests,
all resulting in errors:



/* copied from the w3schools page */

a:after {

    content: " (" attr(href) ")";

}

/*other stuff from my own css */

..styled label[tooltip]:focus:after, .styled label[tooltip]:hover:after,
..styled label[tooltip]:active:after {

     content: attr(tooltip); /* texts with attribute tooltip come from db,
so I have to use this, better would be data-tooltip*/

}

..styled label[tooltip]:focus:after, .styled label[tooltip]:hover:after,
..styled label[tooltip]:active:after {

     content: attr(data-tooltip);

}





There is also a problem with the pseudo element :read-only

http://www.w3schools.com/cssref/sel_read-only.asp

input:read-only {

    background-color: yellow;

}

The validator says that there’s an unknown pseudo element or pseudo class:
:read-only




Best regards

Hannes
Received on Saturday, 12 December 2015 21:01:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:01:18 UTC