not-default-ns-003.html (924B)
1 <!DOCTYPE html> 2 <title>Default namespace respected inside :is() for non-subject compounds</title> 3 <link rel="help" href="https://drafts.csswg.org/selectors-4/#negation"> 4 <link rel="match" href="/css/reference/blank.html"> 5 <!-- 6 As with :is(), default namespace declarations do not affect the compound 7 selector representing the *subject* of any selector within a :not() 8 pseudo-class, unless that compound selector contains an explicit universal 9 selector or type selector. 10 --> 11 <style> 12 @namespace "http://www.w3.org/1999/xhtml"; 13 14 *|*.a { 15 display:initial; 16 } 17 18 /* This should apply, since the '.container' compound is affected by the 19 default namespace (even though the '.a' compound is not). */ 20 *|g *|*:not(.container .a) { 21 display:none; 22 } 23 24 </style> 25 <svg xmlns="http://www.w3.org/2000/svg" width="200" height="100"> 26 <g class=container> 27 <text class="a" y="1em">FAIL if this text is visible</text> 28 </g> 29 </svg>