Thursday, 14. August 2003, 12:44:01
css attribute selectors
Does Opera (I have 7.11, windows) support css attribute selectors on elements in a namespace?I've tried so far without success with or without using the @namespace css3 declaration.
Given
<?xml-stylesheet type="text/css" href="test1.css"?>
<xx>
<x>
<z>abc</z>
<z s="bold">xyz</z>
</x>
<x xmlns="http://www.example.com">
<z>abc</z>
<z s="bold">xyz</z>
</x>
</xx>
and a test1.css stylesheet that looks like
x {display:block;}
z {display:inline; color:green;}
z
I see that the first two z elements are styled;
one green abc and one bold blue xyz
However in the second example in the example.com namespace
only the first css selector appears to be having an effect and both
abc and xyz are styled green.
adding
@namespace url([url]http://www.example.com);
changes the format slightly but still doesn't make the second
xyz go bold or blue.
Any advice on any syntax that works in opera to style such an element based on attribute values would be gratefully received,
David
Thursday, 14. August 2003, 13:51:20
Strange, should work but fails, seems to be bug. In CSS2 selectors should be applied regardless namespace, in CSS3 one should take into account namespaces in certain cases
but Opera does not support CSS3 selectors and Opera's behaviour in current situation does not fit in CSS3 selectors matching scheme either. I think it bug and should be reported at [url]https://bugs.opera.com/wizard/
but Opera does not support CSS3 selectors and Opera's behaviour in current situation does not fit in CSS3 selectors matching scheme either. I think it bug and should be reported at [url]https://bugs.opera.com/wizard/
Thursday, 14. August 2003, 14:09:35
Thanks for the confirmation, I have done as you suggested and used the bug report form.
David
David
Forums » Opera Community » General Opera topics » Opera and cross-browser Web design