3 ms·
Not wanting to disrupt piety, and I'm not sure how situation was back in 2002, but I'm slightly confused and I think there are several mistakes in that test: 1
by myfonj 11y ago
Not wanting to disrupt piety, and I'm not sure how situation was back in 2002, but I'm slightly confused and I think there are several mistakes in that test:
1) source pretends to be XHTML, but since document is served as text/html, it is treated as HTML. And there are no namespaces in HTML. I assume there never been any in 2002, but cannot swear on that.
2) CSS selector "ns\:elem" has nothing to do with namespaces, it is just selector looking for <ns:elem>s 'tagname'. It works in HTML, and that's what page actually shows. Try this:
data:text/html,<style>a\:\:\:{color:red}</style><a:::>foo</a:::>
3) Even if it was served as application/xhtml+xml, it would be:
3a) invalid: ex3 namespace is not declared;
3b) if fixed, then without applied style: SGML comment around CSS content would hide it from parser (or at least it does something like this in my test).
4) @namespace declarations in CSS must be "on the top" (after @charset and @imports, IIRC), not after rules, so that one declaration in the test is ignored.
5) Test4 has a typo: element name in html is `text`, but CSS selector looks for `test`.
I'm not sure all those remarks would make sense back in '02 context, but if it was as misleading as it seems to me, it is quite sad how many people has been possibly confused by that, considering it is fourth verbatim Google result for "CSS namespaces": https://www.google.com/search?q=css+namespaces&tbs=li:1 https://www.google.com/search?q=css+namespaces&tbs=li:1