1212 rel =dcterms.rights >
1313 < meta content ="CSS Conditional Rules Module Level 3 " name =dcterms.title >
1414 < meta content =text name =dcterms.type >
15- < meta content =2012-10-12 name =dcterms.issued >
15+ < meta content =2012-10-30 name =dcterms.issued >
1616 < meta content ="http://dev.w3.org/csswg/css3-conditional/ "
1717 name =dcterms.creator >
1818 < meta content =W3C name =dcterms.publisher >
19- < meta content ="http://www.w3.org/TR/2012/ED-css3-conditional-20121012 / "
19+ < meta content ="http://www.w3.org/TR/2012/ED-css3-conditional-20121030 / "
2020 name =dcterms.identifier >
2121 < link href ="../default.css " rel =stylesheet type ="text/css ">
2222 < link href ="http://www.w3.org/StyleSheets/TR/W3C-ED.css " rel =stylesheet
2323 type ="text/css ">
24- < script src ="http://test.csswg.org/harness/annotate.js#CSS3-CONDITIONAL_DEV "
25- type ="text/javascript " defer > </ script >
24+ < script defer =defer
25+ src ="http://test.csswg.org/harness/annotate.js#CSS3-CONDITIONAL_DEV "
26+ type ="text/javascript "> </ script >
2627
2728 < body >
2829 < div class =head > <!--begin-logo-->
3132
3233 < h1 > CSS Conditional Rules Module Level 3</ h1 >
3334
34- < h2 class ="no-num no-toc " id =longstatus-date > Editor's Draft 12 October
35+ < h2 class ="no-num no-toc " id =longstatus-date > Editor's Draft 30 October
3536 2012</ h2 >
3637
3738 < dl >
3839 < dt > This version:
3940
40- < dd > < a href ="http://www.w3.org/TR/2012/ED-css3-conditional-20121012 / ">
41- http://www.w3.org/TR/2012/ED-css3-conditional-20121012 /</ a >
41+ < dd > < a href ="http://www.w3.org/TR/2012/ED-css3-conditional-20121030 / ">
42+ http://www.w3.org/TR/2012/ED-css3-conditional-20121030 /</ a >
4243
4344 < dt > Latest version:
4445
@@ -562,18 +563,40 @@ <h2 id=at-supports><span class=secno>6. </span>Feature queries: the
562563 < p > and the grammar by adding
563564
564565 < pre > < dfn id ="supports_rule "> supports_rule</ dfn >
565- : SUPPORTS_SYM S* supports_condition group_rule_body
566+ : SUPPORTS_SYM S* < a
567+ href ="#supports_condition0 "> < i > supports_condition</ i > </ a > group_rule_body
566568 ;
567569
568570< dfn
569571 id ="supports_condition "> supports_condition</ dfn >
572+ : NOT S* '(' any+ ')' S* |
573+ '(' any+ ')' S* ( ( AND | OR ) S* any+ )*
574+ </ pre >
575+
576+ < p > The < code > any</ code > token is taken from < a
577+ href ="http://www.w3.org/TR/CSS21/syndata.html "> CSS 2.1 Syntax and Basic
578+ Data Types</ a > .
579+
580+ < p > The above grammar is purposely very loose for forwards-compatibility
581+ reasons. Any ‘< code class =css > @supports</ code > ’ rule that does not
582+ parse according to the grammar above is invalid. Style sheets < strong > must
583+ not</ strong > use such a rule and processors < strong > must</ strong > ignore
584+ such a rule.
585+
586+ < p > The actual processing model of ‘< code class =css > @supports</ code > ’
587+ is predicated on a more restricted grammar, composed of functions or
588+ parenthesized declarations, combined together with logical combinators, as
589+ defined by these grammars:
590+
591+ < pre > < dfn id ="supports_condition0 "> supports_condition</ dfn >
570592 : supports_negation | supports_conjunction | supports_disjunction |
571593 supports_condition_in_parens
572594 ;
573595
574596< dfn
575597 id ="supports_condition_in_parens "> supports_condition_in_parens</ dfn >
576- : ( '(' S* supports_condition ')' S* ) | supports_declaration_condition
598+ : ( '(' S* supports_condition ')' S* ) | supports_declaration_condition |
599+ supports_function
577600 ;
578601
579602< dfn
@@ -593,7 +616,12 @@ <h2 id=at-supports><span class=secno>6. </span>Feature queries: the
593616
594617< dfn
595618 id ="supports_declaration_condition "> supports_declaration_condition</ dfn >
596- : '(' S* core_declaration ')' S* | FUNCTION S* [any|unused]* ')'
619+ : '(' S* core_declaration ')' S*
620+ ;
621+
622+ < dfn
623+ id ="supports_function "> supports_function</ dfn >
624+ : FUNCTION S* [any|unused]* ')'
597625 ;</ pre >
598626
599627 < p > in which < code > core_declaration</ code > is the production
@@ -604,18 +632,6 @@ <h2 id=at-supports><span class=secno>6. </span>Feature queries: the
604632 < code > NOT</ code > tokens are defined in the Media Queries specification < a
605633 href ="#MEDIAQ " rel =biblioentry > [MEDIAQ]<!--{{!MEDIAQ}}--> </ a > .
606634
607- < p > Any ‘< code class =css > @supports</ code > ’ rule that does not parse
608- according to the grammar above is invalid. Style sheets < strong > must
609- not</ strong > use such a rule and processors < strong > must</ strong > ignore
610- such a rule.
611-
612- < p class =note > Note that this means that declarations that meet the
613- forward-compatible syntax for declarations are permitted (and support for
614- them is then tested by the ‘< code class =css > @supports</ code > ’ rule),
615- but declarations that do not meet the forward-compatible syntax for
616- declarations cause the entire ‘< code class =css > @supports</ code > ’ rule
617- to be ignored.
618-
619635 < p > Each of these grammar terms is associated with a boolean result, as
620636 follows:
621637
@@ -627,7 +643,7 @@ <h2 id=at-supports><span class=secno>6. </span>Feature queries: the
627643 < dt > supports_condition_in_parens
628644
629645 < dd > The result is the result of the single < a
630- href ="#supports_condition "> < code > supports_condition</ code > </ a > or < a
646+ href ="#supports_condition0 "> < code > supports_condition</ code > </ a > or < a
631647 href ="#supports_declaration_condition "> < code > supports_declaration_condition</ code > </ a >
632648 child term.
633649
@@ -651,16 +667,25 @@ <h2 id=at-supports><span class=secno>6. </span>Feature queries: the
651667
652668 < dt > supports_declaration_condition
653669
654- < dd > The result is false if this corresponds to a functional notation;
655- otherwise, the result is whether the CSS processor < a
670+ < dd > The result is whether the CSS processor < a
656671 href ="#support-definition "> supports</ a > the declaration within the
657- parentheses. < span class =note > Note that future levels may define
658- functions that can evaluate to true.</ span >
672+ parentheses.
673+
674+ < dt > supports_function
675+
676+ < dd > The result is always false. < span class =note > Note that future levels
677+ may define functions that can evaluate to true.</ span >
678+
679+ < dt > anything else
680+
681+ < dd > If a parenthesized expression does not match the result of one of the
682+ grammar productions above, it must not be treated as invalid, but rather
683+ simply be false for the purpose of support conditions.
659684 </ dl >
660685
661686 < p > The condition of the ‘< code class =css > @supports</ code > ’ rule is the
662687 result of the < a
663- href ="#supports_condition "> < code > supports_condition</ code > </ a > term that
688+ href ="#supports_condition0 "> < code > supports_condition</ code > </ a > term that
664689 is a child of the < a href ="#supports_rule "> < code > supports_rule</ code > </ a >
665690 term.
666691
@@ -1186,7 +1211,7 @@ <h3 id=the-css-interface><span class=secno>7.6. </span> The <a
11861211 < p > When invoked with a single < var > conditionText</ var > argument, it must
11871212 return < code > true</ code > if < var > conditionText</ var > , when parsed and
11881213 evaluated as a < a
1189- href ="#supports_condition "> < code > supports_condition</ code > </ a > , would
1214+ href ="#supports_condition0 "> < code > supports_condition</ code > </ a > , would
11901215 return true. Otherwise, it must return < code > false</ code > .
11911216 </ dl >
11921217
@@ -1535,6 +1560,8 @@ <h2 class=no-num id=index>Index</h2>
15351560 title =support > < strong > 6.1.</ strong > </ a >
15361561
15371562 < li > supports_condition, < a href ="#supports_condition "
1563+ title ="supports_condition "> < strong > 6.</ strong > </ a > , < a
1564+ href ="#supports_condition0 "
15381565 title ="supports_condition "> < strong > 6.</ strong > </ a >
15391566
15401567 < li > supports_condition_in_parens, < a href ="#supports_condition_in_parens "
@@ -1550,6 +1577,9 @@ <h2 class=no-num id=index>Index</h2>
15501577 < li > supports_disjunction, < a href ="#supports_disjunction "
15511578 title ="supports_disjunction "> < strong > 6.</ strong > </ a >
15521579
1580+ < li > supports_function, < a href ="#supports_function "
1581+ title ="supports_function "> < strong > 6.</ strong > </ a >
1582+
15531583 < li > supports_negation, < a href ="#supports_negation "
15541584 title ="supports_negation "> < strong > 6.</ strong > </ a >
15551585
0 commit comments