@@ -28,6 +28,10 @@ WPT Display: open
2828<pre class="link-defaults">
2929 spec: css-conditional-3
3030 type: dfn; text: conditional group rule
31+ spec:css-namespaces-3;
32+ type:dfn; text:namespace prefix
33+ spec:css-namespaces-3;
34+ type:dfn; text:CSS qualified name
3135</pre>
3236
3337<h2 id="introduction">Introduction</h2>
@@ -55,7 +59,6 @@ Extensions to the ''@supports'' rule</h2>
5559 provided as an argument to the function.
5660
5761<wpt>
58- at-supports-namespace-002.html
5962 at-supports-selector-001.html
6063 at-supports-selector-002.html
6164 at-supports-selector-003.html
@@ -78,6 +81,42 @@ Extensions to the ''@supports'' rule</h2>
7881 </pre>
7982</div>
8083
84+ Any namespace prefixes used in a [=conditional group rule=]
85+ must have been declared,
86+ otherwise they are invalid [[!css-conditional-3]] .
87+ This includes namespace prefixes inside the selector function.
88+
89+ <wpt>
90+ at-supports-namespace-002.html
91+ </wpt>
92+
93+ <div class="invalid example" id="ex-ns-selector-invalid">
94+ This example tries to check that attribute selectors
95+ with [=CSS qualified name=] s are supported,
96+ but is invalid,
97+ because the namespace prefix has not been declared.
98+
99+ <pre class="lang-css">
100+ @supports selector(a[xlink|href] ) {
101+ // do something, but fail
102+ }
103+ }
104+ </pre>
105+ </div>
106+
107+ <div class="example" id="ex-ns-selector">
108+ This example checks that attribute selectors
109+ with [=CSS qualified name=] s are supported.
110+
111+ <pre class="lang-css">
112+ @namespace x url(http://www.w3.org/1999/xlink);
113+ @supports selector(a[x|href] ) {
114+ // do something
115+ }
116+ }
117+ </pre>
118+ </div>
119+
81120<h3 id="support-definition-ext">
82121Extensions to the definition of support</h3>
83122
@@ -123,6 +162,9 @@ Changes since the <a href="https://www.w3.org/TR/2020/WD-css-conditional-4-20200
123162
124163 <ul>
125164 <li> Added [[#privacy|Privacy]] and [[#security|Security]] sections.
165+ <li> Added some examples</li>
166+ <li> Clarified that the requirement to declare namespace prefixes
167+ applies to selectors inside selector() (<a href="https://github.com/w3c/csswg-drafts/issues/3220">Issue 3220</a> )</li>
126168 </ul>
127169
128170<h3 id="changes-from-L4" class="no-num">
0 commit comments