- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Sun, 15 Apr 2007 17:27:55 -0400
- To: www-style@w3.org
Boris Zbarsky wrote: > > Bjoern Hoehrmann wrote: >>> * Would "toto|A" also work without a namespace declaration assuming that >>> there is such an element, or would it be ignored? >> >> If you mean whether the selector 'toto|A' would match anything if the >> prefix 'toto' has not been declared, then the answer is no. > > I would hope that not only would that selector not match but that the > rule in question would be discarded altogether.... Yep. The Selectors spec defines this: http://www.w3.org/TR/css3-selectors/#typenmsp # A type selector containing a namespace prefix that has not been # previously declared is an invalid_ selector. # # .. _invalid: http://www.w3.org/TR/css3-selectors/#Conformance CSS3 Namespaces can't define this (because it requires some knowledge of the context in which a qname is used), but makes a recommendation that any modules referencing it make an equivalent statement: http://www.w3.org/TR/css3-namespace/#css-qnames # Those modules should define the use of a namespace prefix that has # not been properly declared as a parsing error that will cause the # selector or declaration (etc.) to be considered invalid and ignored. ~fantasai
Received on Sunday, 15 April 2007 21:28:09 UTC