|
17 | 17 |
|
18 | 18 | <h1>CSS Conditional Rules Module Level 3</h1> |
19 | 19 |
|
20 | | - <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 13 June 2011</h2> |
| 20 | + <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 14 June 2011</h2> |
21 | 21 |
|
22 | 22 | <dl> |
23 | 23 | <dt>This version: |
24 | 24 |
|
25 | | - <dd><a href="http://www.w3.org/TR/2011/ED-css3-conditional-20110613/"> |
26 | | - http://www.w3.org/TR/2011/ED-css3-conditional-20110613</a> |
| 25 | + <dd><a href="http://www.w3.org/TR/2011/ED-css3-conditional-20110614/"> |
| 26 | + http://www.w3.org/TR/2011/ED-css3-conditional-20110614</a> |
27 | 27 |
|
28 | 28 | <dt>Latest version: |
29 | 29 |
|
@@ -178,6 +178,13 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2> |
178 | 178 |
|
179 | 179 | <li><a href="#at-supports"><span class=secno>6. </span>Feature queries: |
180 | 180 | the ‘<code class=css>@supports</code>’ rule</a> |
| 181 | + <ul class=toc> |
| 182 | + <li><a href="#support-definition"><span class=secno>6.1. |
| 183 | + </span>Definition of support</a> |
| 184 | + |
| 185 | + <li><a href="#partial-implementations"><span class=secno>6.2. |
| 186 | + </span>Partial implementations</a> |
| 187 | + </ul> |
181 | 188 |
|
182 | 189 | <li><a href="#at-document"><span class=secno>7. </span>Document queries: |
183 | 190 | the ‘<code class=css>@document</code>’ rule</a> |
@@ -562,45 +569,46 @@ <h2 id=at-supports><span class=secno>6. </span>Feature queries: the |
562 | 569 | : '(' S* declaration ')' S* |
563 | 570 | ;</pre> |
564 | 571 |
|
565 | | - <p>The rules for evaluating the condition in each of the above grammar |
566 | | - terms are: |
| 572 | + <p>Each of these grammar terms is associated with a boolean result, as |
| 573 | + follows: |
567 | 574 |
|
568 | 575 | <dl> |
569 | 576 | <dt>supports_condition |
570 | 577 |
|
571 | | - <dd> evaluate the single child term |
| 578 | + <dd> The result is the result of the single child term. |
572 | 579 |
|
573 | 580 | <dt>supports_negation |
574 | 581 |
|
575 | | - <dd> negate the result of evaluating the single child term |
| 582 | + <dd> The result is the <em>negation</em> of the result of the |
| 583 | + <code>supports_condition_in_parens</code> child term. |
576 | 584 |
|
577 | 585 | <dt>supports_conjunction |
578 | 586 |
|
579 | | - <dd> true if all of the (non-‘<code class=css>and</code>’) |
580 | | - child terms are true, otherwise false |
| 587 | + <dd> The result is true if the result of <em>all</em> of the |
| 588 | + <code>supports_condition_in_parens</code> child terms is true; otherwise |
| 589 | + it is false. |
581 | 590 |
|
582 | 591 | <dt>supports_disjunction |
583 | 592 |
|
584 | | - <dd> true if any of the (non-‘<code class=css>or</code>’) |
585 | | - child terms are true, otherwise false |
| 593 | + <dd> The result is true if the result of <em>any</em> of the |
| 594 | + <code>supports_condition_in_parens</code> child terms is true; otherwise |
| 595 | + it is false. |
586 | 596 |
|
587 | 597 | <dt>supports_condition_in_parens |
588 | 598 |
|
589 | | - <dd> evaluate the single (non-‘<code class=css>(</code>’ and |
590 | | - non-‘<code class=css>)</code>’) child term |
| 599 | + <dd> The result is the result of the single |
| 600 | + <code>supports_condition</code> or |
| 601 | + <code>supports_declaration_condition</code> child term. |
591 | 602 |
|
592 | 603 | <dt>supports_declaration_condition |
593 | 604 |
|
594 | | - <dd> true if the user agent supports the declaration (which is the same as |
595 | | - the rule for whether the user agent parses the declaration), otherwise |
596 | | - false <span class=issue>Need more normative prose here; probably some in |
597 | | - the snapshot which we (unfortunately) need to copy rather than |
598 | | - cite.</span> |
| 605 | + <dd> The result is whether the CSS processor <a |
| 606 | + href="#support-definition">supports</a> the declaration. |
599 | 607 | </dl> |
600 | 608 |
|
601 | | - <p>and the condition of the ‘<code class=css>@supports</code>’ |
602 | | - rule is the condition thus described for the <code>supports_rule</code> |
603 | | - term. |
| 609 | + <p>The condition of the ‘<code class=css>@supports</code>’ rule |
| 610 | + is the result of the <code>supports_condition</code> term that is a child |
| 611 | + of the <code>supports_rule</code> term. |
604 | 612 |
|
605 | 613 | <div class=example> |
606 | 614 | <p>For example, the following rule</p> |
@@ -691,6 +699,41 @@ <h2 id=at-supports><span class=secno>6. </span>Feature queries: the |
691 | 699 | }</pre> |
692 | 700 | </div> |
693 | 701 |
|
| 702 | + <h3 id=support-definition><span class=secno>6.1. </span>Definition of |
| 703 | + support</h3> |
| 704 | + |
| 705 | + <p>A CSS processor is considered to <dfn id=dfn-support>support</dfn> a |
| 706 | + declaration (consisting of a property and value) if it implements the |
| 707 | + given value of the given property. |
| 708 | + |
| 709 | + <h3 id=partial-implementations><span class=secno>6.2. </span>Partial |
| 710 | + implementations</h3> |
| 711 | + |
| 712 | + <p>For forward-compatibility, <a |
| 713 | + href="http://www.w3.org/TR/CSS21/syndata.html#declaration">section 4.1.8 |
| 714 | + (Declarations and properties)</a> of <a href="#CSS21" |
| 715 | + rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> defines rules for handling |
| 716 | + invalid properties and values. CSS processors that partially implement a |
| 717 | + specification <strong>must</strong> treat any part of a value that they: |
| 718 | + |
| 719 | + <ul> |
| 720 | + <li>do not implement, or |
| 721 | + |
| 722 | + <li>do not have a usable level of support for, |
| 723 | + </ul> |
| 724 | + |
| 725 | + <p>as invalid according to this rule, and <strong>must not</strong> accept |
| 726 | + or support a declaration containing such a value. This allows authors to |
| 727 | + use fallback (either in the <a href="#CSS1" |
| 728 | + rel=biblioentry>[CSS1]<!--{{CSS1}}--></a> sense of declarations that are |
| 729 | + overridden by later declarations or with the new capabilities provided by |
| 730 | + the ‘<code class=css>@supports</code>’ rule in this |
| 731 | + specification) that works correctly for the features implemented. This |
| 732 | + applies especially to compound values; implementations must implement all |
| 733 | + parts of the value in order to consider the declaration supported, either |
| 734 | + inside a ruleset or in the declaration condition of an ‘<code |
| 735 | + class=css>@supports</code>’ rule. |
| 736 | + |
694 | 737 | <h2 id=at-document><span class=secno>7. </span>Document queries: the |
695 | 738 | ‘<code class=css>@document</code>’ rule</h2> |
696 | 739 |
|
@@ -1174,6 +1217,9 @@ <h2 class=no-num id=index>Index</h2> |
1174 | 1217 | <li>regexp(), <a href="#url-regexp" |
1175 | 1218 | title="regexp()"><strong>7.</strong></a> |
1176 | 1219 |
|
| 1220 | + <li>support, <a href="#dfn-support" |
| 1221 | + title=support><strong>6.1.</strong></a> |
| 1222 | + |
1177 | 1223 | <li>‘<code class=css>@supports</code>’ rule, <a |
1178 | 1224 | href="#supports-rule" title="'@supports' rule"><strong>6.</strong></a> |
1179 | 1225 |
|
|
0 commit comments