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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Hannes Sprafke

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