Skip to content

Commit

Permalink
[css-conditional-3] Define @supports selector function.
Browse files Browse the repository at this point in the history
Depends on #3773.

Closes #3207.
  • Loading branch information
emilio authored and dbaron committed Apr 12, 2019
1 parent e41d224 commit 43ac5c0
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion css-conditional-3/Overview.bs
Expand Up @@ -245,8 +245,9 @@ with <<supports-condition>> defined as:
| <<supports-in-parens>> [ and <<supports-in-parens>> ]*
| <<supports-in-parens>> [ or <<supports-in-parens>> ]*
<dfn>&lt;supports-in-parens></dfn> = ( <<supports-condition>> ) | <<supports-feature>> | <<general-enclosed>>
<dfn>&lt;supports-feature></dfn> = <<supports-decl>>
<dfn>&lt;supports-feature></dfn> = <<supports-selector-fn>> | <<supports-decl>>
<dfn>&lt;supports-decl></dfn> = ( <<declaration>> )
<dfn>&lt;supports-selector-fn></dfn> = selector( <<complex-selector>> )
</pre>

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

: <<supports-selector-fn>>
::
The result is true if the UA
<a href="#dfn-support-selector">supports the selector</a>
provided as an argument to the function.

: <<general-enclosed>>
::
The result is unknown.
Expand Down Expand Up @@ -472,6 +479,12 @@ compound values; implementations must implement all parts of the value
in order to consider the declaration supported, either inside a style rule
or in the declaration condition of an ''@supports'' rule.

A CSS processor is considered to
<dfn export for=CSS id="dfn-support-selector">support a CSS selector</dfn>
if it accepts that selector (rather than discarding it as a
parse error), and that selector doesn't contain
<a>unknown -webkit- pseudo-elements</a>.

<h2 id="apis">APIs</h2>

<h3 id='extentions-to-cssrule-interface'>
Expand Down

0 comments on commit 43ac5c0

Please sign in to comment.