Skip to content

Commit 43ac5c0

Browse files
emiliodbaron
authored andcommitted
[css-conditional-3] Define @supports selector function.
Depends on w3c#3773. Closes w3c#3207.
1 parent e41d224 commit 43ac5c0

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

css-conditional-3/Overview.bs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,9 @@ with <<supports-condition>> defined as:
245245
| <<supports-in-parens>> [ and <<supports-in-parens>> ]*
246246
| <<supports-in-parens>> [ or <<supports-in-parens>> ]*
247247
<dfn>&lt;supports-in-parens></dfn> = ( <<supports-condition>> ) | <<supports-feature>> | <<general-enclosed>>
248-
<dfn>&lt;supports-feature></dfn> = <<supports-decl>>
248+
<dfn>&lt;supports-feature></dfn> = <<supports-selector-fn>> | <<supports-decl>>
249249
<dfn>&lt;supports-decl></dfn> = ( <<declaration>> )
250+
<dfn>&lt;supports-selector-fn></dfn> = selector( <<complex-selector>> )
250251
</pre>
251252

252253
The above grammar is purposely very loose for forwards-compatibility reasons,
@@ -286,6 +287,12 @@ as follows:
286287
::
287288
The result is true if the UA [=supports=] the declaration within the parentheses.
288289

290+
: <<supports-selector-fn>>
291+
::
292+
The result is true if the UA
293+
<a href="#dfn-support-selector">supports the selector</a>
294+
provided as an argument to the function.
295+
289296
: <<general-enclosed>>
290297
::
291298
The result is unknown.
@@ -472,6 +479,12 @@ compound values; implementations must implement all parts of the value
472479
in order to consider the declaration supported, either inside a style rule
473480
or in the declaration condition of an ''@supports'' rule.
474481

482+
A CSS processor is considered to
483+
<dfn export for=CSS id="dfn-support-selector">support a CSS selector</dfn>
484+
if it accepts that selector (rather than discarding it as a
485+
parse error), and that selector doesn't contain
486+
<a>unknown -webkit- pseudo-elements</a>.
487+
475488
<h2 id="apis">APIs</h2>
476489

477490
<h3 id='extentions-to-cssrule-interface'>

0 commit comments

Comments
 (0)