- From: David Baron via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 14 Jun 2011 00:28:30 +0000
- To: public-css-commits@w3.org
Update of /sources/public/csswg/css3-conditional In directory hutz:/tmp/cvs-serv28927 Modified Files: Overview.html Overview.src.html Log Message: Clean up @supports definition and define support better. Index: Overview.html =================================================================== RCS file: /sources/public/csswg/css3-conditional/Overview.html,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- Overview.html 13 Jun 2011 23:51:51 -0000 1.16 +++ Overview.html 14 Jun 2011 00:28:28 -0000 1.17 @@ -17,13 +17,13 @@ <h1>CSS Conditional Rules Module Level 3</h1> - <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 13 June 2011</h2> + <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 14 June 2011</h2> <dl> <dt>This version: - <dd><a href="http://www.w3.org/TR/2011/ED-css3-conditional-20110613/"> - http://www.w3.org/TR/2011/ED-css3-conditional-20110613</a> + <dd><a href="http://www.w3.org/TR/2011/ED-css3-conditional-20110614/"> + http://www.w3.org/TR/2011/ED-css3-conditional-20110614</a> <dt>Latest version: @@ -178,6 +178,13 @@ <li><a href="#at-supports"><span class=secno>6. </span>Feature queries: the ‘<code class=css>@supports</code>’ rule</a> + <ul class=toc> + <li><a href="#support-definition"><span class=secno>6.1. + </span>Definition of support</a> + + <li><a href="#partial-implementations"><span class=secno>6.2. + </span>Partial implementations</a> + </ul> <li><a href="#at-document"><span class=secno>7. </span>Document queries: the ‘<code class=css>@document</code>’ rule</a> @@ -562,45 +569,46 @@ : '(' S* declaration ')' S* ;</pre> - <p>The rules for evaluating the condition in each of the above grammar - terms are: + <p>Each of these grammar terms is associated with a boolean result, as + follows: <dl> <dt>supports_condition - <dd> evaluate the single child term + <dd> The result is the result of the single child term. <dt>supports_negation - <dd> negate the result of evaluating the single child term + <dd> The result is the <em>negation</em> of the result of the + <code>supports_condition_in_parens</code> child term. <dt>supports_conjunction - <dd> true if all of the (non-‘<code class=css>and</code>’) - child terms are true, otherwise false + <dd> The result is true if the result of <em>all</em> of the + <code>supports_condition_in_parens</code> child terms is true; otherwise + it is false. <dt>supports_disjunction - <dd> true if any of the (non-‘<code class=css>or</code>’) - child terms are true, otherwise false + <dd> The result is true if the result of <em>any</em> of the + <code>supports_condition_in_parens</code> child terms is true; otherwise + it is false. <dt>supports_condition_in_parens - <dd> evaluate the single (non-‘<code class=css>(</code>’ and - non-‘<code class=css>)</code>’) child term + <dd> The result is the result of the single + <code>supports_condition</code> or + <code>supports_declaration_condition</code> child term. <dt>supports_declaration_condition - <dd> true if the user agent supports the declaration (which is the same as - the rule for whether the user agent parses the declaration), otherwise - false <span class=issue>Need more normative prose here; probably some in - the snapshot which we (unfortunately) need to copy rather than - cite.</span> + <dd> The result is whether the CSS processor <a + href="#support-definition">supports</a> the declaration. </dl> - <p>and the condition of the ‘<code class=css>@supports</code>’ - rule is the condition thus described for the <code>supports_rule</code> - term. + <p>The condition of the ‘<code class=css>@supports</code>’ rule + is the result of the <code>supports_condition</code> term that is a child + of the <code>supports_rule</code> term. <div class=example> <p>For example, the following rule</p> @@ -691,6 +699,41 @@ }</pre> </div> + <h3 id=support-definition><span class=secno>6.1. </span>Definition of + support</h3> + + <p>A CSS processor is considered to <dfn id=dfn-support>support</dfn> a + declaration (consisting of a property and value) if it implements the + given value of the given property. + + <h3 id=partial-implementations><span class=secno>6.2. </span>Partial + implementations</h3> + + <p>For forward-compatibility, <a + href="http://www.w3.org/TR/CSS21/syndata.html#declaration">section 4.1.8 + (Declarations and properties)</a> of <a href="#CSS21" + rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> defines rules for handling + invalid properties and values. CSS processors that partially implement a + specification <strong>must</strong> treat any part of a value that they: + + <ul> + <li>do not implement, or + + <li>do not have a usable level of support for, + </ul> + + <p>as invalid according to this rule, and <strong>must not</strong> accept + or support a declaration containing such a value. This allows authors to + use fallback (either in the <a href="#CSS1" + rel=biblioentry>[CSS1]<!--{{CSS1}}--></a> sense of declarations that are + overridden by later declarations or with the new capabilities provided by + the ‘<code class=css>@supports</code>’ rule in this + specification) that works correctly for the features implemented. This + applies especially to compound values; implementations must implement all + parts of the value in order to consider the declaration supported, either + inside a ruleset or in the declaration condition of an ‘<code + class=css>@supports</code>’ rule. + <h2 id=at-document><span class=secno>7. </span>Document queries: the ‘<code class=css>@document</code>’ rule</h2> @@ -1174,6 +1217,9 @@ <li>regexp(), <a href="#url-regexp" title="regexp()"><strong>7.</strong></a> + <li>support, <a href="#dfn-support" + title=support><strong>6.1.</strong></a> + <li>‘<code class=css>@supports</code>’ rule, <a href="#supports-rule" title="'@supports' rule"><strong>6.</strong></a> Index: Overview.src.html =================================================================== RCS file: /sources/public/csswg/css3-conditional/Overview.src.html,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- Overview.src.html 13 Jun 2011 23:51:51 -0000 1.16 +++ Overview.src.html 14 Jun 2011 00:28:28 -0000 1.17 @@ -388,46 +388,50 @@ : '(' S* declaration ')' S* ;</pre> -<p>The rules for evaluating the condition in each of the above grammar -terms are:</p> +<p>Each of these grammar terms is associated with a boolean result, as +follows:</p> <dl> <dt>supports_condition</dt> <dd> - evaluate the single child term + The result is the result of the single child term. </dd> <dt>supports_negation</dt> <dd> - negate the result of evaluating the single child term + The result is the <em>negation</em> of the result of the + <code>supports_condition_in_parens</code> child term. </dd> <dt>supports_conjunction</dt> <dd> - true if all of the (non-''and'') child terms are true, otherwise false + The result is true if the result of <em>all</em> of the + <code>supports_condition_in_parens</code> child terms is true; + otherwise it is false. </dd> <dt>supports_disjunction</dt> <dd> - true if any of the (non-''or'') child terms are true, otherwise false + The result is true if the result of <em>any</em> of the + <code>supports_condition_in_parens</code> child terms is true; + otherwise it is false. </dd> <dt>supports_condition_in_parens</dt> <dd> - evaluate the single (non-''('' and non-'')'') child term + The result is the result of the single <code>supports_condition</code> + or <code>supports_declaration_condition</code> child term. </dd> <dt>supports_declaration_condition</dt> <dd> - true if the user agent supports the declaration (which is the same - as the rule for whether the user agent parses the declaration), - otherwise false - <span class="issue">Need more normative prose here; probably some in the - snapshot which we (unfortunately) need to copy rather than cite.</span> + The result is whether the CSS processor <a + href="#support-definition">supports</a> the declaration. </dd> </dl> -<p>and the condition of the '@supports' rule is the -condition thus described for the <code>supports_rule</code> term.</p> +<p>The condition of the '@supports' rule is the result of the +<code>supports_condition</code> term that is a child of the +<code>supports_rule</code> term.</p> <div class="example"> <p>For example, the following rule</p> @@ -499,6 +503,34 @@ }</pre> </div> +<h3 id="support-definition">Definition of support</h3> + +<p>A CSS processor is considered to <dfn id="dfn-support">support</dfn> +a declaration (consisting of a property and value) if it implements the +given value of the given property.</p> + +<h3 id="partial-implementations">Partial implementations</h3> + +<p>For forward-compatibility, <a +href="http://www.w3.org/TR/CSS21/syndata.html#declaration">section 4.1.8 +(Declarations and properties)</a> of [[!CSS21]] defines rules for +handling invalid properties and values. CSS processors that partially +implement a specification <strong>must</strong> treat any part of a +value that they:</p> +<ul> + <li>do not implement, or</li> + <li>do not have a usable level of support for,</li> +</ul> +<p>as invalid according to this rule, and <strong>must not</strong> +accept or support a declaration containing such a value. This allows +authors to use fallback (either in the [[CSS1]] sense of declarations +that are overridden by later declarations or with the new capabilities +provided by the ''@supports'' rule in this specification) that works +correctly for the features implemented. This applies especially to +compound values; implementations must implement all parts of the value +in order to consider the declaration supported, either inside a ruleset +or in the declaration condition of an ''@supports'' rule.</p> + <h2 id="at-document">Document queries: the '@document' rule</h2> <p>The <dfn>'@document' rule</dfn> is a conditional group
Received on Tuesday, 14 June 2011 00:28:32 UTC