@@ -28,6 +28,10 @@ WPT Display: open
28
28
<pre class="link-defaults">
29
29
spec: css-conditional-3
30
30
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
31
35
</pre>
32
36
33
37
<h2 id="introduction">Introduction</h2>
@@ -55,7 +59,6 @@ Extensions to the ''@supports'' rule</h2>
55
59
provided as an argument to the function.
56
60
57
61
<wpt>
58
- at-supports-namespace-002.html
59
62
at-supports-selector-001.html
60
63
at-supports-selector-002.html
61
64
at-supports-selector-003.html
@@ -78,6 +81,42 @@ Extensions to the ''@supports'' rule</h2>
78
81
</pre>
79
82
</div>
80
83
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
+
81
120
<h3 id="support-definition-ext">
82
121
Extensions to the definition of support</h3>
83
122
@@ -123,6 +162,9 @@ Changes since the <a href="https://www.w3.org/TR/2020/WD-css-conditional-4-20200
123
162
124
163
<ul>
125
164
<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>
126
168
</ul>
127
169
128
170
<h3 id="changes-from-L4" class="no-num">
0 commit comments