css3-conditional/Overview.src.html

Tue, 13 Nov 2012 15:02:47 -0800

author
L. David Baron <dbaron@dbaron.org>
date
Tue, 13 Nov 2012 15:02:47 -0800
changeset 7032
a0055078c6c1
parent 7031
0eeeaff20f24
child 7033
75bace3c4dec
permissions
-rw-r--r--

Link grammar productions throughout, rather than in just a few places.

dbaron@2974 1 <!DOCTYPE html public '-//W3C//DTD HTML 4.01//EN'
dbaron@2974 2 'http://www.w3.org/TR/html4/strict.dtd'>
dbaron@2974 3 <html lang="en">
dbaron@2974 4 <head profile="http://www.w3.org/2006/03/hcard">
dbaron@2974 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
dbaron@2974 6 <title>CSS Conditional Rules Module Level 3</title>
dbaron@2974 7 <link rel="stylesheet" type="text/css" href="../default.css">
dbaron@2974 8 <link rel="stylesheet" type="text/css"
dbaron@2974 9 href="http://www.w3.org/StyleSheets/TR/W3C-[STATUS].css">
peter@6932 10 <script src="http://test.csswg.org/harness/annotate.js#CSS3-CONDITIONAL_DEV"
peter@6932 11 type="text/javascript" defer></script>
dbaron@2974 12 </head>
dbaron@2974 13
dbaron@2974 14 <div class="head">
dbaron@2974 15 <!--logo-->
dbaron@2974 16
dbaron@2974 17 <h1>CSS Conditional Rules Module Level 3</h1>
dbaron@2974 18
dbaron@2974 19 <h2 class="no-num no-toc">[LONGSTATUS] [DATE]</h2>
dbaron@2974 20 <dl>
dbaron@2974 21 <dt>This version:
dbaron@2974 22 <dd><a href="[VERSION]">
dbaron@6731 23 http://www.w3.org/TR/[YEAR]/ED-css3-conditional-[CDATE]/</a>
dbaron@2974 24
dbaron@2974 25 <dt>Latest version:
dbaron@3241 26 <dd><a href="http://www.w3.org/TR/[SHORTNAME]/">http://www.w3.org/TR/[SHORTNAME]/</a>
dbaron@2974 27
dbaron@3245 28 <dt>Editor's draft:
bert@3404 29 <dd><a href="http://dev.w3.org/csswg/[SHORTNAME]/">http://dev.w3.org/csswg/[SHORTNAME]/</a>
dbaron@3245 30
dbaron@2974 31 <dt>Previous version:
fantasai@6831 32 <dd><a href="http://www.w3.org/TR/2012/WD-css3-conditional-20120911/">http://www.w3.org/TR/2012/WD-css3-conditional-20120911/</a></dd>
dbaron@2974 33
dbaron@2974 34 <dt>Editors:
dbaron@2974 35 <dd class=vcard><a class=fn href="http://dbaron.org/">L. David Baron</a>,
dbaron@6308 36 <a class=org href="http://www.mozilla.org/">Mozilla</a>
dbaron@3744 37
dbaron@3744 38 <dt>Issues list:
dbaron@3744 39 <dd>Maintained in document (only editor's draft is current)
dbaron@3744 40
fantasai@6697 41 <dt>Feedback:
fantasai@6697 42
fantasai@6697 43 <dd><a
fantasai@6697 44 href="http://lists.w3.org/Archives/Public/www-style/">www-style@w3.org</a>
dbaron@6738 45 with subject line “<kbd>&#x5b;[SHORTNAME]&#x5d; <var>… message topic
fantasai@6697 46 …</var></kbd>”
dbaron@3744 47
dbaron@3744 48 <dt>Test suite:
dbaron@6115 49 <dd><a href="https://test.csswg.org/shepherd/search/spec/css3-conditional/">submitted tests</a>; no built test suite yet
dbaron@3744 50
dbaron@2974 51 </dl>
dbaron@2974 52
dbaron@2974 53 <!--copyright-->
dbaron@2974 54
dbaron@2974 55 <hr title="Separator for header">
dbaron@2974 56 </div>
dbaron@2974 57
jackalmage@6617 58 <h2 class="no-num no-toc" id="abstract">Abstract</h2>
dbaron@2974 59
dbaron@2974 60 <p>CSS is a language for describing the rendering of structured documents
dbaron@2974 61 (such as HTML and XML) on screen, on paper, in speech, etc. This module
dbaron@2974 62 contains the features of CSS for conditional processing of parts of
dbaron@2974 63 style sheets, conditioned on capabilities of the processor or the
dbaron@2974 64 document the style sheet is being applied to.
dbaron@2974 65 It includes and extends the functionality of CSS level&nbsp;2 [[!CSS21]],
dbaron@2974 66 which builds on CSS level&nbsp;1 [[CSS1]].
dbaron@2974 67 The main extensions compared to level&nbsp;2 are
dbaron@2983 68 allowing nesting of certain at-rules inside '@media',
jackalmage@6838 69 and the addition of the '@supports'
jackalmage@6838 70 rule for conditional processing.
dbaron@2974 71
jackalmage@6617 72 <h2 class="no-num no-toc" id="status">Status of this document</h2>
dbaron@2974 73
dbaron@2974 74 <!--status-->
dbaron@2974 75
dbaron@2974 76 <p>The following features are at risk:
dbaron@2974 77 <ul>
dbaron@2983 78 <li>The inclusion of '@font-face' rules and
dbaron@2983 79 '@keyframes' rules as allowed within all of the @-rules in
dbaron@2974 80 this specification is at risk, though only because of the relative
dbaron@2974 81 rates of advancement of specifications. If this specification is able
dbaron@2974 82 to advance faster than one or both of the specifications defining
dbaron@2974 83 those rules, then the inclusion of those rules will move from this
dbaron@2974 84 specification to the specification defining those rules.</li>
dbaron@2974 85
dbaron@2974 86 <li>The addition of support for @-rules inside of conditional grouping
dbaron@2974 87 rules is at risk; if interoperable implementations are not found, it
dbaron@2974 88 may be removed to advance the other features in this specification to
dbaron@2974 89 Proposed Recommendation.</li>
dbaron@2974 90
dbaron@2983 91 <li>The '@supports' rule is at risk; if interoperable
dbaron@2974 92 implementations are not found, it may be removed to advance the other
dbaron@2974 93 features in this specification to Proposed Recommendation.</li>
jackalmage@6838 94 </ul>
jackalmage@6837 95
jackalmage@6838 96 <!--
dbaron@2974 97
jackalmage@6838 98 Things to go in level 4:
jackalmage@6838 99
jackalmage@6838 100 * Create some way to put these new conditional things on an @import.
jackalmage@6838 101 * The @document rule (commented out, down below).
jackalmage@6838 102
jackalmage@6838 103 -->
dbaron@2974 104
jackalmage@6617 105 <h2 class="no-num no-toc" id="contents">Table of contents</h2>
dbaron@2974 106
dbaron@2974 107 <!--toc-->
dbaron@2974 108
jackalmage@6617 109 <h2 id="introduction">Introduction</h2>
dbaron@2974 110
jackalmage@6617 111 <h3 id="context">Background</h3>
dbaron@2974 112
dbaron@2974 113 <p><em>This section is not normative.</em>
dbaron@2974 114
dbaron@2974 115 <p>[[!CSS21]] defines one type of conditional group rule, the
dbaron@2983 116 '@media' rule, and allows only rulesets (not other @-rules)
dbaron@2983 117 inside of it. The '@media' rule provides the ability to
dbaron@2974 118 have media-specific style sheets, which is also provided by style
dbaron@2983 119 sheet linking features such as '@import' and
dbaron@2983 120 <code class="html">&lt;link&gt;</code>. The restrictions on the contents of
dbaron@2983 121 '@media' rules made them less useful; they have forced authors
dbaron@2974 122 using CSS features involving @-rules in media-specific style sheets to
dbaron@2974 123 use separate style sheets for each medium.</p>
dbaron@2974 124
dbaron@2974 125 <p>This specification extends the rules for the contents of
dbaron@2974 126 conditional group rules to allow other @-rules, which enables authors
dbaron@2974 127 to combine CSS features involving @-rules with media specific style
dbaron@2974 128 sheets within a single style sheet.</p>
dbaron@2974 129
jackalmage@6838 130 <p>This specification also defines an additional type of conditional
jackalmage@6838 131 group rule, '@supports', to
dbaron@2974 132 address author and user requirements.</p>
dbaron@2974 133
dbaron@2983 134 <p>The '@supports' rule allows CSS to be conditioned on
dbaron@2974 135 implementation support for CSS properties and values. This rule makes
dbaron@2974 136 it much easier for authors to use new CSS features and provide good
dbaron@2974 137 fallback for implementations that do not support those features. This
dbaron@2974 138 is particularly important for CSS features that provide new layout
dbaron@2974 139 mechanisms, and for other cases where a set of related styles needs to
dbaron@2974 140 be conditioned on property support.</p>
dbaron@2974 141
jackalmage@6617 142 <h3 id="placement">Module Interactions</h3>
dbaron@2974 143
dbaron@2983 144 <p>This module replaces and extends the '@media' rule
dbaron@2974 145 feature defined in [[!CSS21]] section <var>7.2.1</var> and
dbaron@2974 146 incorporates the modifications previously made non-normatively by
dbaron@2974 147 [[!MEDIAQ]] section <var>1</var>.</p>
dbaron@2974 148
dbaron@3462 149 <p>Its current definition depends on @-rules defined in [[!CSS3-FONTS]]
dbaron@2974 150 and [[!CSS3-ANIMATIONS]], but that dependency is only on the
dbaron@2974 151 assumption that those modules will advance ahead of this one. If this
dbaron@2974 152 module advances faster, then the dependency will be reversed.</p>
dbaron@2974 153
jackalmage@6617 154 <h3 id="conventions">Document Conventions</h3>
dbaron@2974 155
dbaron@2974 156 <p>Conformance requirements are expressed with a combination of
dbaron@2974 157 descriptive assertions and RFC 2119 terminology. The key words “MUST”,
dbaron@2974 158 “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”,
dbaron@2974 159 “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this
dbaron@2974 160 document are to be interpreted as described in RFC 2119.
dbaron@2979 161 However, for readability, these words do not appear in all uppercase
dbaron@2979 162 letters in this specification.
dbaron@2974 163
dbaron@2974 164 <p>All of the text of this specification is normative except sections
dbaron@2974 165 explicitly marked as non-normative, examples, and notes. [[!RFC2119]]</p>
dbaron@2974 166
dbaron@2974 167 <p>Examples in this specification are introduced with the words “for example”
dbaron@2983 168 or are set apart from the normative text with
dbaron@2983 169 <code class="html">class="example"</code>, like this:
dbaron@2974 170
dbaron@2974 171 <div class="example">
dbaron@2974 172 <p>This is an example of an informative example.</p>
dbaron@2974 173 </div>
dbaron@2974 174
dbaron@2974 175 <p>Informative notes begin with the word “Note” and are set apart from the
dbaron@2983 176 normative text with <code class="html">class="note"</code>, like this:
dbaron@2974 177
dbaron@2974 178 <p class="note">Note, this is an informative note.</p>
dbaron@2974 179
jackalmage@6617 180 <h2 id="processing">Processing of conditional group rules</h2>
dbaron@2974 181
dbaron@2974 182 <p>This specification defines some CSS @-rules, called <dfn>conditional
dbaron@2974 183 group rules</dfn>, that associate a condition with a group of other
dbaron@2974 184 CSS rules. These different rules allow testing different types of
dbaron@2974 185 conditions, but share common behavior for how their contents are used
dbaron@2974 186 when the condition is true and when the condition is false.</p>
dbaron@2974 187
dbaron@2974 188 <div class="example">
dbaron@2974 189 <p>For example, this rule:</p>
dbaron@2974 190 <pre>@media print {
dbaron@2974 191 #navigation { display: none }
dbaron@2974 192 }</pre>
dbaron@2974 193 <p>causes a particular CSS rule (making elements with ID "navigation" be
dbaron@2974 194 display:none) apply only when the style sheet is used for a print
jackalmage@6838 195 medium.
dbaron@2974 196 </div>
dbaron@2974 197
dbaron@2974 198 <p>Each conditional group rule has a condition, which at any time
dbaron@2974 199 evaluates to true or false. When the condition is true, CSS processors
dbaron@2979 200 <strong>must</strong> apply the rules inside the group rule as though
dbaron@2979 201 they were at the group rule's location; when the condition is false, CSS
dbaron@3948 202 processors <strong>must not</strong> apply any of rules inside the group
dbaron@2979 203 rule. The current state of the condition does not affect the CSS object
dbaron@2979 204 model, in which the contents of the group rule always remain within the
dbaron@2979 205 group rule.</p>
dbaron@2974 206
dbaron@2974 207 <p>This means that when multiple conditional group rules are nested,
dbaron@2974 208 a rule inside of both of them applies only when all of the rules'
dbaron@2974 209 conditions are true.</p>
dbaron@2974 210
dbaron@2974 211 <div class="example">For example, with this set of nested rules:
dbaron@2974 212 <pre>@media print { // rule (1)
dbaron@2974 213 #navigation { display: none }
dbaron@2974 214 @media (max-width: 12cm) { // rule (2)
dbaron@2974 215 .note { float: none }
dbaron@2974 216 }
dbaron@2974 217 }</pre>
dbaron@2974 218 the condition of the rule marked (1) is true for print media, and the
dbaron@2974 219 condition of the rule marked (2) is true when the width of the display
dbaron@2974 220 area (which for print media is the page box) is less than or equal to
dbaron@2983 221 12cm. Thus the rule ''#navigation { display: none }'' applies
dbaron@2974 222 whenever this style sheet is applied to print media, and the rule
dbaron@2983 223 ''.note { float: none }'' is applied only when the style sheet
dbaron@2974 224 is applied to print media <em>and</em> the width of the page box is less
dbaron@2974 225 than or equal to 12 centimeters.</div>
dbaron@2974 226
dbaron@2979 227 <p>When the condition for a conditional group rule changes, CSS
dbaron@2979 228 processors <strong>must</strong> reflect that the rules now apply or no
dbaron@2979 229 longer apply, except for properties whose definitions define effects of
dbaron@2979 230 computed values that persist past the lifetime of that value (such as
dbaron@2979 231 for some properties in [[CSS3-TRANSITIONS]] and
dbaron@2979 232 [[!CSS3-ANIMATIONS]]).</p>
dbaron@2974 233
jackalmage@6617 234 <h2 id="contents-of">Contents of conditional group rules</h2>
dbaron@2974 235
dbaron@2974 236 <p>The syntax of each conditional group rule consists of some syntax
dbaron@2974 237 specific to the type of rule followed by a <dfn>group rule body</dfn>,
dbaron@2974 238 which is a block (pair of braces) containing a sequence of rules.</p>
dbaron@2974 239
dbaron@2974 240 <p>A group rule body is allowed to contain rulesets and any @-rules that
dbaron@2974 241 are allowed at the top level of a style sheet before and after a
dbaron@2974 242 ruleset. This means that @-rules that must occur at the beginning of
dbaron@3020 243 the style sheet (such as '@charset', '@import',
dbaron@3020 244 and '@namespace' rules) are not allowed inside of conditional group
dbaron@2974 245 rules. Conditional group rules can be nested.</p>
dbaron@2974 246
dbaron@2974 247 <p>In terms of the grammar, this specification defines the following
dbaron@2974 248 productions for use in the grammar of conditional group rules:</p>
dbaron@2974 249
dbaron@7032 250 <pre><dfn>nested_statement</dfn>
dbaron@7032 251 : ruleset | <i>media</i> | page | font_face_rule | keyframes_rule |
dbaron@7032 252 <i>supports_rule</i>
dbaron@2974 253 ;
dbaron@2974 254
dbaron@7032 255 <dfn>group_rule_body</dfn>
dbaron@7032 256 : '{' S* <i>nested_statement</i>* '}' S*
dbaron@2974 257 ;</pre>
bert@3404 258 <p>
dbaron@2974 259 in which all the productions are defined in that grammar with the
jackalmage@6839 260 exception of <code>font_face_rule</code>
dbaron@5294 261 defined in [[!CSS3-FONTS]], <code>keyframes_rule</code> defined in
jackalmage@6838 262 [[!CSS3-ANIMATIONS]], and <code>media</code> and <code>supports_rule</code>
jackalmage@6838 263 defined in this specification.</p>
dbaron@2974 264
dbaron@2974 265 <p>In general, future CSS specifications that add new @-rules that are
dbaron@2974 266 not forbidden to occur after some other types of rules should modify
dbaron@2974 267 this <code>nested_statement</code> production to keep the grammar
dbaron@2974 268 accurate.</p>
dbaron@2974 269
dbaron@2979 270 <p>Style sheets <strong>must not</strong> use rules other than the allowed ones inside
dbaron@2974 271 conditional group rules.</p>
dbaron@2974 272
dbaron@3019 273 <p>CSS processors <strong>must</strong> ignore rules that are not
dbaron@3019 274 allowed within a group rule, and <strong>must</strong> handle invalid
dbaron@3019 275 rules inside of group rules as described in <a
dbaron@3019 276 href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors">section
dbaron@3019 277 4.2 (Rules for handling parsing errors)</a>, <a
dbaron@3019 278 href="http://www.w3.org/TR/CSS21/syndata.html#at-rules">section 4.1.5
dbaron@3019 279 (At-rules)</a>, and <a
dbaron@3019 280 href="http://www.w3.org/TR/CSS21/syndata.html#rule-sets">section 4.1.7
dbaron@3019 281 (Rule sets, declaration blocks, and selectors)</a> of [[!CSS21]].</p>
dbaron@2974 282
jackalmage@6617 283 <h2 id="use">Placement of conditional group rules</h2>
dbaron@2974 284
dbaron@3019 285 <p>Conditional group rules are allowed at the top-level of a style
dbaron@3019 286 sheet, and inside other conditional group rules. CSS processors
dbaron@3019 287 <strong>must</strong> process such rules as <a
dbaron@3019 288 href="#processing">described above</a>.</p>
dbaron@3019 289
dbaron@3020 290 <p>Any rules that are not allowed after a ruleset (e.g., ''@charset'',
dbaron@3020 291 ''@import'', or ''@namespace'' rules) are also not allowed after a
dbaron@3020 292 conditional group rule. Therefore, style sheets <strong>must
dbaron@3019 293 not</strong> place such rules after a conditional group rules, and CSS
dbaron@3019 294 processors <strong>must</strong> ignore such rules.</p>
dbaron@2974 295
jackalmage@6617 296 <h2 id="at-media">Media-specific style sheets: the '@media' rule</h2>
dbaron@2974 297
dbaron@2983 298 <p>The <dfn>'@media' rule</dfn> is a conditional group rule whose
dbaron@2974 299 condition is a media query. It consists of the at-keyword
jackalmage@6830 300 '@media' followed by a (possibly empty) media query list (as
dbaron@2974 301 defined in [[!MEDIAQ]]), followed by a group rule body. The condition
dbaron@2974 302 of the rule is the result of the media query.</p>
dbaron@2974 303
dbaron@2974 304 <div class="example">
dbaron@2983 305 <p>This '@media' rule:</p>
dbaron@2974 306 <pre>@media print, (max-width: 600px) {
dbaron@2974 307 #extra_navigation { display: none }
dbaron@2974 308 }</pre>
dbaron@2983 309 <p>has the condition ''print, (max-width: 600px)'', which is
dbaron@2974 310 true for print media and for devices whose width is at most 600px. When
dbaron@2979 311 either of these is true, the condition of the rule is true, and the rule
dbaron@2983 312 ''#extra_navigation { display: none }'' is applied.
dbaron@2974 313 </div>
dbaron@2974 314
dbaron@2974 315 <p>In terms of the grammar, this specification extends the
dbaron@2974 316 <code>media</code> production in the
dbaron@2974 317 <a href="http://www.w3.org/TR/CSS21/grammar.html">Grammar of CSS 2.1</a>
dbaron@2974 318 ([[!CSS21]], Appendix G) into:
dbaron@7032 319 <pre><dfn>media</dfn>
dbaron@7032 320 : MEDIA_SYM S* media_query_list <i>group_rule_body</i>
dbaron@2974 321 ;</pre>
dbaron@2974 322 <p>where the <code>group_rule_body</code> production is defined in this
dbaron@2974 323 specification, the <code>media_query_list</code> production is defined
dbaron@2974 324 in [[!MEDIAQ]], and the others are defined in the <a
dbaron@2974 325 href="http://www.w3.org/TR/CSS21/grammar.html">Grammar of CSS 2.1</a>
dbaron@2974 326 ([[!CSS21]], Appendix G).
dbaron@2974 327
jackalmage@6617 328 <h2 id="at-supports">Feature queries: the '@supports' rule</h2>
dbaron@2974 329
dbaron@2983 330 <p>The <dfn>'@supports' rule</dfn> is a conditional group
dbaron@2974 331 rule whose condition tests whether the user agent supports CSS
dbaron@2974 332 property:value pairs. Authors can use it to write style sheets that use
dbaron@2974 333 new features when available but degrade gracefully when those features
dbaron@2974 334 are not supported. CSS has existing mechanisms for graceful
dbaron@2974 335 degradation, such as ignoring unsupported properties or values, but
dbaron@2974 336 these are not always sufficient when large groups of styles need to be
dbaron@2974 337 tied to the support for certain features, as is the case for use of new
dbaron@2974 338 layout system features.</p>
dbaron@2974 339
dbaron@2983 340 <p>The syntax of the condition in the '@supports' rule is
dbaron@2974 341 slightly more complicated than for the other conditional group rules
dbaron@2974 342 (though has some similarities to media queries) since:</p>
dbaron@2974 343 <ul>
dbaron@2974 344 <li>negation is needed so that the new-feature styles and the fallback
dbaron@2974 345 styles can be separated (within the forward-compatible grammar's rules
dbaron@2974 346 for the syntax of @-rules), and not required to override each other</li>
dbaron@2974 347 <li>conjunction (and) is needed so that multiple required features can
dbaron@2974 348 be tested</li>
dbaron@2974 349 <li>disjunction (or) is needed when there are multiple alternative
dbaron@2974 350 features for a set of styles, particularly when some of those
dbaron@2974 351 alternatives are vendor-prefixed properties or values</li>
dbaron@2974 352 </ul>
dbaron@2974 353
dbaron@2983 354 <p>Therefore, the syntax of the '@supports' rule allows
dbaron@2974 355 testing for property:value pairs, and arbitrary conjunctions (and),
dbaron@2974 356 disjunctions (or), and negations (not) of them.</p>
dbaron@2974 357
dbaron@2974 358 <p>This extends the lexical scanner in the
dbaron@2974 359 <a href="http://www.w3.org/TR/CSS21/grammar.html">Grammar of CSS 2.1</a>
dbaron@2974 360 ([[!CSS21]], Appendix G) by adding:
jackalmage@6832 361 <pre>
jackalmage@6832 362 @{S}{U}{P}{P}{O}{R}{T}{S} {return SUPPORTS_SYM;}
jackalmage@6832 363 {O}{R} {return OR;}
jackalmage@6832 364 </pre>
jackalmage@6943 365
dbaron@2974 366 <p>and the grammar by adding</p>
jackalmage@6943 367
jackalmage@6315 368 <pre><dfn>supports_rule</dfn>
dbaron@7032 369 : SUPPORTS_SYM S* <i>supports_condition</i> <i>group_rule_body</i>
dbaron@2974 370 ;
dbaron@2974 371
jackalmage@6315 372 <dfn>supports_condition</dfn>
dbaron@7032 373 : <i>supports_negation</i> | <i>supports_conjunction</i> | <i>supports_disjunction</i> |
dbaron@7032 374 <i>supports_condition_in_parens</i>
dbaron@3957 375 ;
dbaron@3957 376
jackalmage@6315 377 <dfn>supports_condition_in_parens</dfn>
dbaron@7032 378 : ( '(' S* <i>supports_condition</i> ')' S* ) | <i>supports_declaration_condition</i> |
dbaron@7032 379 <i>general_enclosed</i>
dbaron@2974 380 ;
dbaron@2974 381
jackalmage@6315 382 <dfn>supports_negation</dfn>
dbaron@7032 383 : NOT S* <i>supports_condition_in_parens</i>
dbaron@2974 384 ;
dbaron@2974 385
jackalmage@6315 386 <dfn>supports_conjunction</dfn>
dbaron@7032 387 : <i>supports_condition_in_parens</i> ( AND S* <i>supports_condition_in_parens</i> )+
dbaron@2974 388 ;
dbaron@2974 389
jackalmage@6315 390 <dfn>supports_disjunction</dfn>
dbaron@7032 391 : <i>supports_condition_in_parens</i> ( OR S* <i>supports_condition_in_parens</i> )+
dbaron@2974 392 ;
dbaron@2974 393
jackalmage@6315 394 <dfn>supports_declaration_condition</dfn>
dbaron@7031 395 : '(' S* declaration ')' S*
jackalmage@6943 396 ;
jackalmage@6943 397
dbaron@7031 398 <dfn>general_enclosed</dfn>
dbaron@7031 399 : ( FUNCTION | '(' ) (any|unused)* ')' S*
dbaron@7031 400 </pre>
jackalmage@6943 401
dbaron@7031 402 <p>in which <code>declaration</code>, <code>any</code>, and
dbaron@7031 403 <code>unused</code> are the productions in the core syntax of CSS
dbaron@7031 404 defined in <a
dbaron@3024 405 href="http://www.w3.org/TR/CSS21/syndata.html#tokenization">section
jackalmage@6832 406 4.1.1 (Tokenization)</a> of [[!CSS21]],
jackalmage@6832 407 and the <code>AND</code> and <code>NOT</code> tokens are defined in
jackalmage@6832 408 the Media Queries specification [[!MEDIAQ]].</p>
dbaron@3024 409
dbaron@7031 410 <p>
dbaron@7031 411 The above grammar is purposely very loose for forwards-compatibility reasons,
dbaron@7031 412 since the <code>general_enclosed</code> production
dbaron@7031 413 allows for substantial future extensibility.
dbaron@7031 414 Any ''@supports'' rule that does not parse according to the grammar above is invalid.
dbaron@7031 415 Style sheets <strong>must not</strong> use such a rule and
dbaron@7031 416 processors <strong>must</strong> ignore such a rule (including all of its contents).
dbaron@7031 417
dbaron@3021 418 <p>Each of these grammar terms is associated with a boolean result, as
dbaron@3021 419 follows:</p>
dbaron@2974 420 <dl>
dbaron@2974 421 <dt>supports_condition</dt>
dbaron@2974 422 <dd>
dbaron@3021 423 The result is the result of the single child term.
dbaron@2974 424 </dd>
dbaron@2974 425
dbaron@3957 426 <dt>supports_condition_in_parens</dt>
dbaron@3957 427 <dd>
dbaron@3957 428 The result is the result of the single <code>supports_condition</code>
dbaron@3957 429 or <code>supports_declaration_condition</code> child term.
dbaron@3957 430 </dd>
dbaron@3957 431
dbaron@2974 432 <dt>supports_negation</dt>
dbaron@2974 433 <dd>
dbaron@3021 434 The result is the <em>negation</em> of the result of the
dbaron@3021 435 <code>supports_condition_in_parens</code> child term.
dbaron@2974 436 </dd>
dbaron@2974 437
dbaron@2974 438 <dt>supports_conjunction</dt>
dbaron@2974 439 <dd>
dbaron@3021 440 The result is true if the result of <em>all</em> of the
dbaron@3021 441 <code>supports_condition_in_parens</code> child terms is true;
dbaron@3021 442 otherwise it is false.
dbaron@2974 443 </dd>
dbaron@2974 444
dbaron@2974 445 <dt>supports_disjunction</dt>
dbaron@2974 446 <dd>
dbaron@3021 447 The result is true if the result of <em>any</em> of the
dbaron@3021 448 <code>supports_condition_in_parens</code> child terms is true;
dbaron@3021 449 otherwise it is false.
dbaron@2974 450 </dd>
dbaron@2974 451
dbaron@2974 452 <dt>supports_declaration_condition</dt>
dbaron@2974 453 <dd>
jackalmage@6943 454 The result is whether the CSS processor <a href="#support-definition">supports</a> the declaration
fantasai@6845 455 within the parentheses.
jackalmage@6943 456 </dd>
jackalmage@6943 457
dbaron@7031 458 <dt>general_enclosed</dt>
jackalmage@6943 459 <dd>
jackalmage@6943 460 The result is always false.
dbaron@7031 461 Additionally, style sheets <strong>must not</strong>
dbaron@7031 462 write ''@supports'' rules
dbaron@7031 463 that match this grammar production.
dbaron@7031 464 (In other words, this production exists only for future extensibility,
dbaron@7031 465 and is not part of the description of a valid style sheet
dbaron@7031 466 in this level of the specification.)
dbaron@7031 467 <span class="note">Note that future levels may define functions
dbaron@7031 468 or other parenthesized expressions that can evaluate to true.</span>
dbaron@2974 469 </dd>
jackalmage@6943 470
dbaron@3021 471 <p>The condition of the '@supports' rule is the result of the
dbaron@3021 472 <code>supports_condition</code> term that is a child of the
dbaron@3021 473 <code>supports_rule</code> term.</p>
dbaron@2974 474
dbaron@2982 475 <div class="example">
dbaron@2982 476 <p>For example, the following rule</p>
dbaron@2982 477 <pre>@supports ( display: flexbox ) {
dbaron@2982 478 body, #navigation, #content { display: flexbox; }
dbaron@2982 479 #navigation { background: blue; color: white; }
dbaron@2982 480 #article { background: white; color: black; }
dbaron@2982 481 }</pre>
dbaron@2983 482 <p>applies the rules inside the '@supports' rule only when
dbaron@2983 483 ''display: flexbox'' is supported.</p>
dbaron@2982 484 </div>
dbaron@2974 485
dbaron@2982 486 <div class="example">
dbaron@2982 487 <p>The following example shows an additional '@supports' rule that can
dbaron@2982 488 be used to provide an alternative for when ''display: flexbox'' is not
dbaron@2982 489 supported:</p>
dbaron@2982 490 <pre>@supports not ( display: flexbox ) {
dbaron@2982 491 body { width: 100%; height: 100%; background: white; color: black; }
dbaron@2982 492 #navigation { width: 25%; }
dbaron@2982 493 #article { width: 75%; }
dbaron@2974 494 }</pre>
dbaron@2982 495 <p>Note that the 'width' declarations may be harmful to the
dbaron@2982 496 flexbox-based layout, so it is important that they be present only in
dbaron@2982 497 the non-flexbox styles.</p>
dbaron@2982 498 </div>
dbaron@2974 499
dbaron@2982 500 <div class="example">
dbaron@2982 501 <p>The following example checks for support for the 'box-shadow'
dbaron@2982 502 property, including checking for support for vendor-prefixed versions of
dbaron@2982 503 it. When the support is present, it specifies both 'box-shadow' (with
dbaron@2982 504 the prefixed versions) and 'color' in a way what would cause the text to
dbaron@2982 505 become invisible were 'box-shadow' not supported.</p>
dbaron@2982 506 <pre>@supports ( box-shadow: 2px 2px 2px black ) or
dbaron@2982 507 ( -moz-box-shadow: 2px 2px 2px black ) or
dbaron@2974 508 ( -webkit-box-shadow: 2px 2px 2px black ) or
dbaron@2974 509 ( -o-box-shadow: 2px 2px 2px black ) {
dbaron@2982 510 .outline {
dbaron@2982 511 color: white;
dbaron@2982 512 -moz-box-shadow: 2px 2px 2px black;
dbaron@2982 513 -webkit-box-shadow: 2px 2px 2px black;
dbaron@2982 514 -o-box-shadow: 2px 2px 2px black;
dbaron@3960 515 box-shadow: 2px 2px 2px black; /* unprefixed last */
dbaron@2982 516 }
dbaron@2982 517 }</pre></div>
dbaron@2974 518
dbaron@2984 519 <p>To avoid confusion between ''and'' and ''or'', the syntax requires
dbaron@2984 520 that both ''and'' and ''or'' be specified explicitly (rather than, say,
dbaron@2984 521 using commas or spaces for one of them). Likewise, to avoid confusion
dbaron@2984 522 caused by precedence rules, the syntax does not allow ''and'', ''or'',
dbaron@2984 523 and ''not'' operators to be mixed without a layer of parentheses.</p>
dbaron@2974 524
dbaron@2984 525 <div class="example">
dbaron@2984 526 <p>For example, the following rule is not valid:
dbaron@3959 527 <pre class="illegal">@supports (transition-property: color) or
dbaron@2984 528 (animation-name: foo) and
dbaron@2984 529 (transform: rotate(10deg)) {
dbaron@2984 530 // ...
dbaron@2984 531 }</pre>
dbaron@2984 532 <p>Instead, authors must write one of the following:</p>
dbaron@2984 533 <pre>@supports ((transition-property: color) or
dbaron@2984 534 (animation-name: foo)) and
dbaron@2984 535 (transform: rotate(10deg)) {
dbaron@2984 536 // ...
dbaron@2984 537 }</pre>
dbaron@2984 538 <pre>@supports (transition-property: color) or
dbaron@3430 539 ((animation-name: foo) and
dbaron@2984 540 (transform: rotate(10deg))) {
dbaron@2984 541 // ...
dbaron@2984 542 }</pre>
dbaron@2984 543 </div>
dbaron@2974 544
dbaron@3957 545 <p>The declaration being tested must always occur within parentheses,
dbaron@3957 546 when it is the only thing in the expression.<p>
dbaron@3957 547
dbaron@3957 548 <div class="example">
dbaron@3957 549 <p>For example, the following rule is not valid:
dbaron@3959 550 <pre class="illegal">@supports display: flexbox {
dbaron@3957 551 // ...
dbaron@3957 552 }</pre>
dbaron@3957 553 <p>Instead, authors must write:</p>
dbaron@3957 554 <pre>@supports (display: flexbox) {
dbaron@3957 555 // ...
dbaron@3957 556 }</pre>
dbaron@3957 557 </div>
dbaron@3957 558
dbaron@3957 559 <p>The syntax allows extra parentheses when they are not needed. This
dbaron@3957 560 flexibility is sometimes useful for authors (for example, when
dbaron@3957 561 commenting out parts of an expression) and may also be useful for
dbaron@3957 562 authoring tools.</p>
dbaron@3957 563
dbaron@3957 564 <div class="example">
dbaron@3957 565 <p>For example, authors may write:</p>
dbaron@3957 566 <pre>@supports ((display: flexbox)) {
dbaron@3957 567 // ...
dbaron@3957 568 }</pre>
dbaron@3957 569 </div>
dbaron@3957 570
jackalmage@6793 571 <p>A trailing ''!important'' on a declaration being tested is allowed,
jackalmage@6793 572 though it won't change the validity of the declaration.
jackalmage@6793 573
jackalmage@6793 574 <div class="example">
jackalmage@6793 575 <p>For example, the following rule is valid:
jackalmage@6793 576 <pre>@supports (display: flexbox !important) {
jackalmage@6793 577 // ...
jackalmage@6793 578 }</pre>
jackalmage@6793 579 </div>
dbaron@6306 580
jackalmage@6617 581 <h3 id="support-definition">Definition of support</h3>
dbaron@3021 582
dbaron@6741 583 <p>For forward-compatibility,
dbaron@6741 584 <a href="http://www.w3.org/TR/CSS21/syndata.html#declaration">section 4.1.8
dbaron@6741 585 (Declarations and properties)</a> of [[!CSS21]]
dbaron@6741 586 defines rules for handling invalid properties and values.
dbaron@6741 587 CSS processors that
dbaron@6741 588 do not implement or partially implement a specification
dbaron@6741 589 <strong>must</strong> treat any part of a value that they
dbaron@6741 590 do not implement, or
dbaron@6741 591 do not have a usable level of support for,
dbaron@6741 592 as invalid according to this rule
dbaron@6741 593 for handling invalid properties and values,
dbaron@6741 594 and therefore <strong>must</strong> discard the declaration as a parse error.</p>
dbaron@6741 595
jackalmage@6617 596 <p>A CSS processor is considered to <dfn id="dfn-support">support</dfn>
dbaron@6741 597 a declaration (consisting of a property and value) if it accepts that
dbaron@6741 598 declaration (rather than discarding it as a parse error).
dbaron@6741 599 If a processor does not implement, with a usable level of support,
dbaron@6741 600 the value given,
dbaron@6741 601 then it <strong>must not</strong>
dbaron@6741 602 accept the declaration or claim support for it.</p>
dbaron@3021 603
dbaron@6742 604 <p>These rules (and the equivalence between them) allow
dbaron@3021 605 authors to use fallback (either in the [[CSS1]] sense of declarations
dbaron@3021 606 that are overridden by later declarations or with the new capabilities
dbaron@3021 607 provided by the ''@supports'' rule in this specification) that works
dbaron@3021 608 correctly for the features implemented. This applies especially to
dbaron@3021 609 compound values; implementations must implement all parts of the value
dbaron@3021 610 in order to consider the declaration supported, either inside a ruleset
dbaron@3021 611 or in the declaration condition of an ''@supports'' rule.</p>
dbaron@3021 612
jackalmage@6838 613 <!--
jackalmage@6617 614 <h2 id="at-document">Document queries: the '@document' rule</h2>
dbaron@2974 615
dbaron@2983 616 <p>The <dfn>'@document' rule</dfn> is a conditional group
dbaron@3027 617 rule whose condition depends on the
dbaron@3027 618 <a href="#url-of-doc">URL of the document being styled</a>.
dbaron@2974 619 This allows style sheets, particularly user style sheets, to have styles
dbaron@2974 620 that only apply to a set of pages rather than to all pages using the
dbaron@2974 621 style sheet.</p>
dbaron@2974 622
dbaron@2974 623 <p class="issue">Given that this @-rule is intended primarily for user
dbaron@2974 624 style sheets, what should this specification say about its use in author
dbaron@2974 625 style sheets? Should it be forbidden? Should use instead be
dbaron@2974 626 discouraged? Or should this specification remain neutral on the
dbaron@2986 627 topic, since there are valid uses in author style sheets?</p>
dbaron@2974 628
jackalmage@6617 629 <p id="url-of-doc">The <dfn>URL of the document being styled</dfn> is
dbaron@3027 630 the URI at which the document is located, excluding any fragment
dbaron@3027 631 identifiers. (This means, for example, that HTTP redirects have been
dbaron@3027 632 followed.) If the styles are being applied inside a complete document
dbaron@3246 633 embedded into the presentation of another (e.g., [[HTML5]]&#39;s <code
dbaron@3027 634 class="html">iframe</code>, <code class="html">object</code>, or <code
dbaron@3027 635 class="html">img</code> elements), the relevant URI is that of the
dbaron@3027 636 frame, not of its container. However, if content from other documents
dbaron@3027 637 is mixed in via mechanisms that mix content from one document into
dbaron@3246 638 another (e.g., [[SVG11]]&#39;s <code>use</code> element), then the
dbaron@3027 639 address of the container document is used.</p>
dbaron@3027 640
dbaron@3027 641 <p class="note">Note: In [[HTML5]], this is the
fantasai@6697 642 <a href="http://dev.w3.org/html5/spec/dom.html#documents">document's address</a>
dbaron@3027 643 of a document in a
dbaron@3027 644 <a href="http://dev.w3.org/html5/spec/browsers.html#browsing-context">browsing context</a>.</p>
dbaron@3027 645
dbaron@3240 646 <div class="issue">What form of normalization is done on URLs and domains
dbaron@3240 647 before matching? In particular, this specification needs to describe:
dbaron@3240 648 <ul>
dbaron@3240 649 <li>what form is used for the <a href="#url-of-doc">URL of the document
dbaron@3240 650 being styled</a> (and what has been normalized in that form)</li>
dbaron@3240 651 <li>what normalization (if any) happens to the argument of each of the match
dbaron@3240 652 functions before the comparison that they describe and</li>
dbaron@3240 653 <li>whether the
dbaron@3240 654 comparison algorithm used is string comparison or some other URL
dbaron@3240 655 comparison algorithm.</li></ul></div>
dbaron@3027 656
dbaron@2983 657 <p>The '@document' rule's condition is written as a
dbaron@2974 658 comma-separated list of <dfn>URL matching functions</dfn>, and the
dbaron@2974 659 condition evaluates to true whenever any one of those functions
dbaron@2974 660 evaluates to true. The following URL matching functions are
dbaron@2974 661 permitted:</p>
dbaron@2974 662
dbaron@2974 663 <dl>
jackalmage@6617 664 <dt><dfn id="url-exact" title="url()|URL matching functions::exact">&lt;url&gt;</dfn></dt>
dbaron@2974 665
dbaron@2974 666 <dd>
dbaron@2983 667 <p>The 'url()' function is the <dfn>exact url matching
dbaron@3027 668 function</dfn>. It evaluates to true whenever the <a
dbaron@3027 669 href="#url-of-doc">URL of the document being styled</a> is exactly
dbaron@3027 670 the URL given.</p>
dbaron@2974 671
dbaron@2983 672 <p class="Note">The 'url()' function, since it is a core syntax
dbaron@2974 673 element in CSS, is allowed (subject to different character
dbaron@2974 674 limitations and thus escaping requirements) to contain an unquoted
dbaron@2974 675 value (in addition to the string values that are allowed as
dbaron@2974 676 arguments for all four functions).</p>
dbaron@2974 677
dbaron@2974 678 <div class="example">
dbaron@2974 679 <p>For example, this rule:</p>
dbaron@2974 680 <pre>@document url("http://www.w3.org/Style/CSS/") {
dbaron@2974 681 #summary { background: yellow; color: black}
dbaron@2974 682 }</pre>
dbaron@2983 683 <p>styles the <code class="html">summary</code> element on the page
dbaron@2974 684 <code>http://www.w3.org/Style/CSS/</code>, but not on any other
dbaron@2974 685 pages.</p>
dbaron@2974 686 </div>
dbaron@2974 687 </dd>
dbaron@2974 688
jackalmage@6617 689 <dt><dfn id="url-prefix" title="url-prefix()|URL matching functions::prefix">url-prefix(&lt;string&gt;)</dfn></dt>
dbaron@2974 690
dbaron@2974 691 <dd>
dbaron@2983 692 <p>The 'url-prefix()' function is the <dfn>url prefix
dbaron@3027 693 matching function</dfn>. It evaluates to true whenever the
dbaron@3027 694 <a href="#url-of-doc">URL of the document being styled</a>
dbaron@3027 695 has the argument to the function as an
dbaron@2974 696 initial substring (which is true when the two strings are equal).
dbaron@2974 697 When the argument is the empty string, it evaluates to true for all
dbaron@2974 698 documents.</p>
dbaron@2974 699 <div class="example">
dbaron@2974 700 <p>For example, this rule:</p>
dbaron@2974 701 <pre>@document url-prefix("http://www.w3.org/Style/CSS/") {
dbaron@2974 702 #summary { background: yellow; color: black}
dbaron@2974 703 }</pre>
dbaron@2983 704 <p>styles the <code class="html">summary</code> element on the page
dbaron@2974 705 <code>http://www.w3.org/Style/CSS/</code> and on the page
dbaron@2974 706 <code>http://www.w3.org/Style/CSS/Test</code>, but it does not
dbaron@2974 707 affect the page <code>http://www.w3.org/</code> or the page
dbaron@2974 708 <code>http://www.example.com/Style/CSS/</code>.</p>
dbaron@2974 709 </div>
dbaron@2974 710 </dd>
dbaron@2974 711
jackalmage@6617 712 <dt><dfn id="url-domain" title="domain()|URL matching functions::domain">domain(&lt;string&gt;)</dfn></dt>
dbaron@2974 713
dbaron@2974 714 <dd>
dbaron@2983 715 <p>The 'domain()' function is the <dfn>domain
dbaron@2974 716 matching function</dfn>. It evaluates to true whenever
dbaron@3027 717 the <a href="#url-of-doc">URL of the document being styled</a>
dbaron@3027 718 has a host subcomponent (as defined in [[!URI]])
dbaron@2974 719 and that host subcomponent is exactly the argument to the
dbaron@2983 720 'domain()' function or a final substring of the host
dbaron@2974 721 component is a period (U+002E) immediately followed by the argument
dbaron@2983 722 to the 'domain()' function.</p>
dbaron@2974 723 <div class="example">
dbaron@2974 724 <p>For example, this rule:</p>
dbaron@2974 725 <pre>@document domain("w3.org") {
dbaron@2974 726 body { font-size: 16px ! important }
dbaron@2974 727 }</pre>
dbaron@2974 728 <p>changes the font size of the body element for pages such as
dbaron@2974 729 <code>http://www.w3.org/Style/CSS/</code> and
dbaron@2974 730 <code>http://w3.org/Style/CSS/</code> and
dbaron@2974 731 <code>http://lists.w3.org/Archives/Public/www-style/</code>
dbaron@2974 732 but it does not affect the page
dbaron@2974 733 <code>http://www.example.com/Style/CSS/</code>.</p>
dbaron@2974 734 </div>
dbaron@2974 735 </dd>
dbaron@2974 736
jackalmage@6617 737 <dt><dfn id="url-regexp" title="regexp()|URL matching functions::regular expression">regexp(&lt;string&gt;)</dfn></dt>
dbaron@2974 738
dbaron@2974 739 <dd>
dbaron@2986 740 <p>The contents of the &lt;string&gt; argument <strong>must</strong>
dbaron@3068 741 match the JavaScript <code>Pattern</code> production
dbaron@3068 742 ([[!ECMA-262-5.1]], section 15.10.1). However,
dbaron@2986 743 failing to do so is not a CSS syntax error and does not trigger any
dbaron@2986 744 error handling for CSS syntax errors.</p>
dbaron@2986 745
dbaron@2986 746 <p>The ''regexp()'' function evaluates to true whenever the string
dbaron@2986 747 argument compiled as a JavaScript regular expression with the
dbaron@2986 748 <code>global</code>, <code>ignoreCase</code> and
dbaron@2986 749 <code>multiline</code> flags <em>disabled</em>
dbaron@3068 750 (see [[!ECMA-262-5.1]], sections 15.10.7.2 through 15.10.7.4)
dbaron@2986 751 compiles successfully and the resulting regular expression matches
dbaron@3027 752 the entirety of the
dbaron@3027 753 <a href="#url-of-doc">URL of the document being styled</a>.</p>
dbaron@2986 754
dbaron@2986 755 <p class="note">Note that regular expression must match the entire
dbaron@2986 756 URL, not just a part of it.</p>
dbaron@2974 757
dbaron@3018 758 <p class="note">Note that this definition intentionally matches the
dbaron@3018 759 behavior of the <a
dbaron@2983 760 href="http://dev.w3.org/html5/spec/common-input-element-attributes.html#attr-input-pattern"><code class="html">pattern</code>
dbaron@2983 761 attribute</a> on the <code class="html">input</code> element
dbaron@2983 762 in [[HTML5]].</p>
dbaron@2986 763
dbaron@2986 764 <div class="example">
dbaron@2986 765 <p>For example, this rule:</p>
dbaron@2986 766 <pre>@document regexp("http://www.w3.org/TR/\\d{4}/[^/]*-CSS2-\\d{8}/") {
dbaron@2986 767 body { font-size: 20px ! important }
dbaron@2986 768 }</pre>
dbaron@2986 769 <p>changes the font size of the body element for pages such as
dbaron@2986 770 <code>http://www.w3.org/TR/2011/PR-CSS2-20110412/</code>.</p>
dbaron@2986 771 <p class="note">Note that the backslashes in the regular
dbaron@2986 772 expression require CSS escaping as ''\\''.</p>
dbaron@2986 773 </div>
dbaron@2974 774 </dd>
dbaron@2974 775
dbaron@2974 776 </dl>
dbaron@2974 777
dbaron@2979 778 <p>Implementations <strong>must</strong> treat any unknown URL matching
dbaron@3045 779 functions as a syntax error, and thus ignore the '@document' rule.
dbaron@3045 780 <span class="issue">Should we instead have more complicated error
dbaron@3045 781 handling rules to make forward-compatibility work differently, or is
dbaron@3045 782 this rule the best solution for such future expansion anyway?</span></p>
dbaron@2974 783
dbaron@5293 784 <div class="issue">This syntax doesn't offer any ability to do negations,
dbaron@5293 785 which has been requested in <a
jackalmage@6617 786 href="https://bugzilla.mozilla.org/show_bug.cgi?id=349813">Mozilla bug
dbaron@5293 787 349813</a>. Use cases that people have wanted negations for
dbaron@5293 788 include:
dbaron@5293 789 <ul>
dbaron@5293 790 <li>User style sheets that want a particular rule in general, but know
dbaron@5293 791 that that rule does more harm than good on specific sites.</li>
dbaron@5293 792 <li>Authors who have a rule that they want to apply to most of their
dbaron@5293 793 pages, but wish to make a few exceptions for.</li>
dbaron@5293 794 </ul>
dbaron@5293 795 </div>
dbaron@5293 796
dbaron@2974 797 <p>This extends the lexical scanner in the
dbaron@2974 798 <a href="http://www.w3.org/TR/CSS21/grammar.html">Grammar of CSS 2.1</a>
dbaron@2974 799 ([[!CSS21]], Appendix G) by adding:
dbaron@2974 800 <pre>@{D}{O}{C}{U}{M}{E}{N}{T} {return DOCUMENT_SYM;}</pre>
dbaron@2974 801 <p>and the grammar by adding</p>
dbaron@7032 802 <pre><dfn>document_rule</dfn>
dbaron@7032 803 : DOCUMENT_SYM S+ <i>url_match_fn</i> ( "," S* <i>url_match_fn</i> )* <i>group_rule_body</i>
dbaron@2974 804 ;
dbaron@2974 805
dbaron@7032 806 <dfn>url_match_fn</dfn>
dbaron@6740 807 : (URI | FUNCTION S* STRING S* ')' ) S*
dbaron@2974 808 ;</pre>
jackalmage@6838 809 -->
jackalmage@6838 810
dbaron@2974 811
jackalmage@6617 812 <h2 id="apis">APIs</h2>
dbaron@3416 813
jackalmage@6617 814 <h3 id='extentions-to-cssrule-interface'>
jackalmage@6315 815 Extensions to the <code>CSSRule</code> interface</h3>
dbaron@3416 816
jackalmage@6315 817 <p>The <code>CSSRule</code> interface is extended as follows:
jackalmage@6315 818
jackalmage@6315 819 <pre class='idl'>partial interface CSSRule {
jackalmage@6315 820 const unsigned short SUPPORTS_RULE = 12;
jackalmage@6838 821 <!--
jackalmage@6315 822 const unsigned short DOCUMENT_RULE = 13;
jackalmage@6838 823 -->
jackalmage@6315 824 }</pre>
jackalmage@6315 825
jackalmage@6315 826
jackalmage@6655 827 <h3 id='the-cssgroupingrule-interface'>
jackalmage@6655 828 The <code>CSSGroupingRule</code> interface</h3>
jackalmage@6655 829
jackalmage@6655 830 <p>The <dfn><code>CSSGroupingRule</code></dfn> interface represents an at-rule that contains other rules nested inside itself.
jackalmage@6655 831
jackalmage@6655 832 <pre class='idl'>interface CSSGroupingRule : CSSRule {
jackalmage@6655 833 readonly attribute CSSRuleList cssRules;
jackalmage@6655 834 unsigned long insertRule (DOMString rule, unsigned long index);
jackalmage@6655 835 void deleteRule (unsigned long index);
jackalmage@6655 836 }</pre>
jackalmage@6655 837
jackalmage@6655 838 <dl class='idl-attributes'>
jackalmage@6655 839 <dt><code>cssRules</code> of type <code>CSSRuleList</code>, readonly
jackalmage@6655 840 <dd>The <code>cssRules</code> attribute must return a <code>CSSRuleList</code>
jackalmage@6655 841 object for the list of CSS rules nested inside the grouping rule.
jackalmage@6655 842 </dl>
jackalmage@6655 843
jackalmage@6655 844 <dl class='idl-methods'>
jackalmage@6655 845 <dt><code>insertRule(DOMString rule, unsigned long index)</code>, returns
jackalmage@6655 846 <code>unsigned long</code>
jackalmage@6655 847 <dd>The <code>insertRule</code> operation must insert a CSS rule <var>rule</var>
jackalmage@6655 848 into the CSS rule list returned by <code>cssRules</code> at <var>index</var>.
jackalmage@6655 849
jackalmage@6655 850 <dt><code>deleteRule (unsigned long index)</code>, return <code>void</code>
jackalmage@6655 851 <dd>The <code>deleteRule</code> operation must remove a CSS rule from the
jackalmage@6655 852 CSS rule list returned by <code>cssRules</code> at <var>index</var>.
jackalmage@6655 853 </dl>
jackalmage@6655 854
jackalmage@6655 855
jackalmage@6618 856 <h3 id="the-cssconditionrule-interface">
jackalmage@6618 857 The <code>CSSConditionRule</code> interface</h3>
jackalmage@6315 858
jackalmage@6620 859 <p>The <dfn><code>CSSConditionRule</code></dfn> interface represents all the "conditional" at-rules,
jackalmage@6620 860 which consist of a condition and a statement block.
dbaron@6323 861
jackalmage@6655 862 <pre class='idl'>interface CSSConditionRule : CSSGroupingRule {
dbaron@6324 863 attribute DOMString conditionText;
jackalmage@6315 864 }</pre>
jackalmage@6315 865
jackalmage@6315 866 <dl class='idl-attributes'>
dbaron@6732 867
jackalmage@6619 868 <dt><code>conditionText</code> of type <code>DOMString</code>
dbaron@6732 869 <dd>
dbaron@6732 870 <p>The <code>conditionText</code> attribute represents
dbaron@6732 871 the condition of the rule.
dbaron@6732 872 Since what this condition does
dbaron@6732 873 varies between the derived interfaces of <code>CSSConditionRule</code>,
dbaron@6732 874 those derived interfaces
dbaron@6732 875 may specify different behavior for this attribute
dbaron@6732 876 (see, for example, <code>CSSMediaRule</code> below).
dbaron@6732 877 In the absence of such rule-specific behavior,
dbaron@6732 878 the following rules apply:</p>
dbaron@6732 879
dbaron@6732 880 <p>The <code>conditionText</code> attribute, on getting, must return
jackalmage@6618 881 the result of serializing the associated condition.
jackalmage@6315 882
dbaron@6324 883 <p>On setting the <code>conditionText</code> attribute these steps
jackalmage@6315 884 must be run:
jackalmage@6315 885
jackalmage@6315 886 <ol>
jackalmage@6315 887 <li>Trim the given value of white space.
jackalmage@6315 888 <li>If the given value matches the grammar of the
jackalmage@6618 889 appropriate condition production for the given rule,
jackalmage@6618 890 replace the associated CSS condition with the given value.
jackalmage@6315 891 <li>Otherwise, do nothing.
jackalmage@6315 892 </ol>
jackalmage@6315 893 </dl>
jackalmage@6315 894
jackalmage@6618 895
jackalmage@6618 896 <h3 id="the-cssmediarule-interface">
jackalmage@6618 897 The <code>CSSMediaRule</code> interface</h3>
jackalmage@6618 898
jackalmage@6618 899 <p>The <dfn><code>CSSMediaRule</code></dfn> interface represents a ''@media'' rule:
jackalmage@6618 900
jackalmage@6618 901 <pre class='idl'>interface CSSMediaRule : CSSConditionRule {
jackalmage@6618 902 readonly attribute MediaList media;
jackalmage@6618 903 }</pre>
jackalmage@6618 904
jackalmage@6618 905 <dl class='idl-attributes'>
jackalmage@6618 906 <dt><code>media</code> of type <code>MediaList</code>, readonly
jackalmage@6618 907 <dd>The <code>media</code> attribute must return a <code>MediaList</code> object
jackalmage@6618 908 for the list of media queries specified with the ''@media'' rule.
jackalmage@6618 909
jackalmage@6619 910 <dt><code>conditionText</code> of type <code>DOMString</code>
jackalmage@6618 911 <dd>The <code>conditionText</code> attribute (defined on the <code>CSSConditionRule</code> parent rule),
jackalmage@6618 912 on getting, must return the value of <code>media.mediaText</code> on the rule.
jackalmage@6618 913
jackalmage@6621 914 <p>Setting the <code>conditionText</code> attribute
jackalmage@6621 915 must set the <code>media.mediaText</code> attribute on the rule.
jackalmage@6621 916 </dl>
jackalmage@6618 917
jackalmage@6618 918
jackalmage@6618 919 <h3 id="the-csssupportsrule-interface">
jackalmage@6618 920 The <code>CSSSupportsRule</code> interface</h3>
jackalmage@6618 921
jackalmage@6618 922 <p>The <dfn><code>CSSSupportsRule</code></dfn> interface represents a ''@supports'' rule.</p>
jackalmage@6618 923
jackalmage@6621 924 <pre class='idl'>interface CSSSupportsRule : CSSConditionRule {
jackalmage@6618 925 }</pre>
jackalmage@6618 926
jackalmage@6838 927 <!--
jackalmage@6618 928 <h3 id="the-cssdocumentrule-interface">
jackalmage@6618 929 The <code>CSSDocumentRule</code> interface</h3>
jackalmage@6618 930
jackalmage@6618 931 <p>The <dfn><code>CSSDocumentRule</code></dfn> interface represents a ''@document'' rule.</p>
jackalmage@6618 932
jackalmage@6621 933 <pre class='idl'>interface CSSDocumentRule : CSSConditionRule {
jackalmage@6618 934 }</pre>
jackalmage@6838 935 -->
jackalmage@6315 936
jackalmage@6315 937
jackalmage@6620 938 <h3 id='the-css-interface'>
jackalmage@6620 939 The <code>CSS</code> interface, and the <code title=''>supports()</code> function</h3>
jackalmage@6315 940
jackalmage@6620 941 <p>The <dfn id='CSS-interface'><code>CSS</code></dfn> interface holds useful CSS-related functions that do not belong elsewhere.
jackalmage@6315 942
jackalmage@6620 943 <pre class='idl'>interface CSS {
jackalmage@6620 944 boolean supports(DOMString property, DOMString value);
jackalmage@6620 945 boolean supports(DOMString declaration);
jackalmage@6620 946 }</pre>
jackalmage@6620 947
jackalmage@6620 948 <dl class='idl-methods'>
jackalmage@6620 949 <dt><code>supports(DOMString property, DOMString value)</code>,
jackalmage@6620 950 returns <code>boolean</code>
jackalmage@6625 951 <dt><code>supports(DOMString conditionText)</code>,
jackalmage@6620 952 returns <code>boolean</code>
jackalmage@6620 953 <dd>
jackalmage@6620 954 When the <code title=''>supports()</code> method is invoked with two arguments <var>property</var> and <var>value</var>,
jackalmage@6620 955 it must return <code>true</code> if <var>property</var> is a literal match for the name of a CSS property that the UA supports,
jackalmage@6620 956 and <var>value</var> would be successfully parsed as a supported value for that property.
jackalmage@6620 957 Otherwise, it must return <code>false</code>.
jackalmage@6620 958
jackalmage@6620 959 <p>
jackalmage@6625 960 When invoked with a single <var>conditionText</var> argument,
jackalmage@6625 961 it must return <code>true</code> if <var>conditionText</var>,
jackalmage@6625 962 when parsed and evaluated as a <code>supports_condition</code>,
jackalmage@6625 963 would return true.
jackalmage@6620 964 Otherwise, it must return <code>false</code>.
jackalmage@6620 965 </dl>
jackalmage@6620 966
dbaron@3417 967
fantasai@6831 968 <h2 class=no-num id="grammar">Grammar</h2>
fantasai@6831 969
fantasai@6831 970 <p>In order to allow these new @-rules in CSS style sheets, this
fantasai@6831 971 specification modifies the <code>stylesheet</code> production in the <a
fantasai@6831 972 href="http://www.w3.org/TR/CSS21/grammar.html">Appendix G</a> grammar of
fantasai@6831 973 [[!CSS21]] by replacing the <code>media</code> production defined in
fantasai@6831 974 [[!CSS21]] with the <code>media</code> production defined in this one,
jackalmage@6838 975 and additionally inserting <code>| supports_rule</code>
fantasai@6831 976 alongside <code>ruleset | media | page</code>.</p>
fantasai@6831 977
fantasai@6831 978
jackalmage@6617 979 <h2 id="conformance">Conformance</h2>
dbaron@2974 980
jackalmage@6617 981 <h3 id="base-modules">Base Modules</h3>
dbaron@3022 982
dbaron@3022 983 <p>This specification defines conformance in terms of base modules,
dbaron@3022 984 which are modules that this specification builds on top of. The base
dbaron@3022 985 modules of this module are:</p>
dbaron@3022 986
dbaron@3022 987 <ul>
dbaron@3022 988 <li>[[!CSS21]]</li>
dbaron@3022 989 </ul>
dbaron@3022 990
dbaron@3022 991 <p>All of the conformance requirements of all base modules are
dbaron@3022 992 incorporated as conformance requirements of this module, except where
dbaron@3022 993 overridden by this module.</p>
dbaron@3022 994
dbaron@3022 995 <p>Additionally, all conformance requirements related to validity of
dbaron@3022 996 syntax in this module and all of its base modules are to be interpreted
dbaron@3022 997 as though all syntax in all of those modules is valid.</p>
dbaron@3022 998
dbaron@3022 999 <div class="example"><p>For example, this means that grammar presented
dbaron@3022 1000 in modules other than [[!CSS21]] must obey the requirements that
dbaron@3022 1001 [[!CSS21]] defines for the parsing of properties, and that requirements
dbaron@3022 1002 for handling invalid syntax in [[!CSS21]] do not treat syntax added by
dbaron@3022 1003 other modules as invalid.</p></div>
dbaron@3022 1004
dbaron@3022 1005 <p>Additionally, the set of valid syntax can be increased by the
dbaron@3022 1006 conformance of a style sheet or processor to additional modules; use of
dbaron@3022 1007 such syntax does not make a style sheet nonconformant and failure to
dbaron@3022 1008 treat such syntax as invalid does not make a processor
dbaron@3022 1009 nonconformant.</p>
dbaron@3022 1010
jackalmage@6617 1011 <h3 id="conformance-classes">Conformance Classes</h3>
dbaron@2974 1012
dbaron@2974 1013 <p>Conformance to the CSS Conditional Rules Module is defined for three
dbaron@2974 1014 conformance classes:
dbaron@2974 1015 <dl>
jackalmage@6617 1016 <dt><dfn title="conformance::style sheet" id="conform-style-sheet">style sheet</dfn>
dbaron@2974 1017 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
dbaron@3022 1018 style sheet</a>.</dd>
jackalmage@6617 1019 <dt><dfn title="conformance::processor" id="conform-processor">processor</dfn></dt>
dbaron@3022 1020 <dd>A tool that reads CSS style sheets: it may be a renderer or
dbaron@3022 1021 <a
dbaron@3022 1022 href="http://www.w3.org/TR/CSS21/conform.html#user-agent">user-agent</a>
dbaron@2974 1023 that interprets the semantics of a style sheet and renders
dbaron@3022 1024 documents that use style sheets, or it may be a validator that
dbaron@3022 1025 checks style sheets.</dd>
jackalmage@6617 1026 <dt><dfn title="conformance::authoring tool" id="conform-authoring-tool">authoring tool</dfn></dt>
dbaron@3022 1027 <dd>A tool that writes a style sheet.</dd>
dbaron@2974 1028 </dl>
dbaron@3022 1029
dbaron@3022 1030 <p>A style sheet is conformant to the CSS Conditional Rules Module
dbaron@3022 1031 if it meets all of the conformance requirements in the module that are
dbaron@3022 1032 described as requirements of style sheets.</p>
dbaron@3022 1033
dbaron@3022 1034 <p>A processor is conformant to the CSS Conditional Rules Module if it
dbaron@3022 1035 meets all applicable conformance requirements in the module that are
dbaron@3022 1036 described as requirements of processors. In general, all requirements
dbaron@3022 1037 are applicable to renderers. Requirements concerning a part of CSS
dbaron@3022 1038 not performed by a processor are not applicable, e.g., requirements
dbaron@3022 1039 related to rendering are not applicable to a validator. The inability
dbaron@3022 1040 of a processor to correctly render a document due to limitations of
dbaron@3022 1041 the device does not make it non-conformant. (For example, a renderer
dbaron@3022 1042 is not required to render color on a monochrome monitor.)</p>
dbaron@3022 1043
dbaron@3022 1044 <p>An authoring tool is conformant to the CSS Conditional Rules Module
dbaron@3022 1045 if it writes style sheets that conform to the module and (if it reads
dbaron@3022 1046 CSS) it is a conformant processor.</p>
dbaron@2974 1047
jackalmage@6617 1048 <h3 id="partial">
dbaron@2974 1049 Partial Implementations</h3>
dbaron@2974 1050
dbaron@2974 1051 <p>So that authors can exploit the forward-compatible parsing rules to
dbaron@2974 1052 assign fallback values, CSS renderers <strong>must</strong>
dbaron@2974 1053 treat as invalid (and <a href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore
dbaron@2974 1054 as appropriate</a>) any at-rules, properties, property values, keywords,
dbaron@2974 1055 and other syntactic constructs for which they have no usable level of
dbaron@2974 1056 support. In particular, user agents <strong>must not</strong> selectively
dbaron@2974 1057 ignore unsupported component values and honor supported values in a single
dbaron@2974 1058 multi-value property declaration: if any value is considered invalid
dbaron@2974 1059 (as unsupported values must be), CSS requires that the entire declaration
dbaron@2974 1060 be ignored.</p>
dbaron@2974 1061
jackalmage@6617 1062 <h3 id="experimental">Experimental Implementations</h3>
dbaron@2974 1063
dbaron@2974 1064 <p>To avoid clashes with future CSS features, the CSS specifications
dbaron@2974 1065 reserve a <a href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
dbaron@2974 1066 syntax</a> for proprietary property and value extensions to CSS. The CSS
dbaron@2974 1067 Working Group recommends that experimental implementations of features in
dbaron@2974 1068 CSS Working Drafts also use vendor-prefixed property or value names. This
dbaron@2974 1069 avoids any incompatibilities with future changes in the draft. Once a
dbaron@2974 1070 specification reaches the Candidate Recommendation stage, implementors
dbaron@2974 1071 should implement the non-prefixed syntax for any feature they consider to
dbaron@2974 1072 be correctly implemented according to spec.</p>
dbaron@2974 1073
jackalmage@6617 1074 <h3 id="cr-exit-criteria">CR Exit Criteria</h3>
dbaron@2974 1075
dbaron@3244 1076 <p>For this specification to be advanced to Proposed Recommendation,
dbaron@2974 1077 there must be at least two independent, interoperable implementations
dbaron@2974 1078 of each feature. Each feature may be implemented by a different set of
dbaron@2974 1079 products, there is no requirement that all features be implemented by
dbaron@2974 1080 a single product. For the purposes of this criterion, we define the
dbaron@2974 1081 following terms:
dbaron@2974 1082
dbaron@2974 1083 <dl>
dbaron@2974 1084 <dt>independent <dd>each implementation must be developed by a
dbaron@2974 1085 different party and cannot share, reuse, or derive from code
dbaron@2974 1086 used by another qualifying implementation. Sections of code that
dbaron@2974 1087 have no bearing on the implementation of this specification are
dbaron@2974 1088 exempt from this requirement.
dbaron@2974 1089
dbaron@2974 1090 <dt>interoperable <dd>passing the respective test case(s) in the
dbaron@2974 1091 official CSS test suite, or, if the implementation is not a Web
dbaron@2974 1092 browser, an equivalent test. Every relevant test in the test
dbaron@2974 1093 suite should have an equivalent test created if such a user
dbaron@2974 1094 agent (UA) is to be used to claim interoperability. In addition
dbaron@2974 1095 if such a UA is to be used to claim interoperability, then there
dbaron@2974 1096 must one or more additional UAs which can also pass those
dbaron@2974 1097 equivalent tests in the same way for the purpose of
dbaron@2974 1098 interoperability. The equivalent tests must be made publicly
dbaron@2974 1099 available for the purposes of peer review.
dbaron@2974 1100
dbaron@2974 1101 <dt>implementation <dd>a user agent which:
dbaron@2974 1102
dbaron@2974 1103 <ol class=inline>
dbaron@2974 1104 <li>implements the specification.
dbaron@2974 1105
dbaron@2974 1106 <li>is available to the general public. The implementation may
dbaron@2974 1107 be a shipping product or other publicly available version
dbaron@2974 1108 (i.e., beta version, preview release, or “nightly build”).
dbaron@2974 1109 Non-shipping product releases must have implemented the
dbaron@2974 1110 feature(s) for a period of at least one month in order to
dbaron@2974 1111 demonstrate stability.
dbaron@2974 1112
dbaron@2974 1113 <li>is not experimental (i.e., a version specifically designed
dbaron@2974 1114 to pass the test suite and is not intended for normal usage
dbaron@2974 1115 going forward).
dbaron@2974 1116 </ol>
dbaron@2974 1117 </dl>
dbaron@2974 1118
dbaron@2974 1119 <p>The specification will remain Candidate Recommendation for at least
dbaron@2974 1120 six months.
dbaron@2974 1121
fantasai@6831 1122 <h2 id="changes">
fantasai@6831 1123 Changes</h2>
dbaron@2974 1124
fantasai@6831 1125 <p>The following (non-editorial) changes were made to this specification since the
fantasai@6831 1126 <a href="http://www.w3.org/TR/2012/WD-css3-conditional-20120911/">11 September 2012 Working Draft</a>:
fantasai@6831 1127
fantasai@6831 1128 <ul>
fantasai@6846 1129 <li>Removed ''@document'' rule; it has been deferred to Level 4.
fantasai@6845 1130 <li>Allow functional notation in ''@supports'' queries to be valid (to allow for future extensions),
fantasai@6845 1131 but treat such notations as always being false.
fantasai@6831 1132 <li>Corrected the grammar as follows:
fantasai@6831 1133 <pre>
fantasai@6831 1134 - : SUPPORTS_SYM S+ supports_condition group_rule_body
fantasai@6831 1135 + : SUPPORTS_SYM S* supports_condition group_rule_body
fantasai@6831 1136 </pre>
fantasai@6842 1137 <pre>
fantasai@6842 1138 - : (URI | FUNCTION) S*
fantasai@6842 1139 + : (URI | FUNCTION S* STRING S* ')' ) S*
fantasai@6842 1140 </pre>
fantasai@6842 1141 <li>Switched "and", "or", and "not" keywords to use appropriate productions rather than literals.
fantasai@6846 1142 <li>Clarified definition of support used for interpreting ''@support'' rules
fantasai@6846 1143 and its relationship to CSS forwards-compatible parsing rules.
fantasai@6831 1144 </ul>
dbaron@2974 1145
jackalmage@6617 1146 <h2 class=no-num id="acknowledgments">Acknowledgments</h2>
dbaron@2974 1147
dbaron@2974 1148 <p>
dbaron@2974 1149 Thanks to the ideas and feedback from
dbaron@3418 1150 Tab Atkins,
dbaron@2974 1151 <span lang="tr">Tantek Çelik</span>,
dbaron@3418 1152 Alex Danilo,
dbaron@2974 1153 Elika Etemad,
dbaron@2974 1154 Pascal Germroth,
dbaron@2974 1155 <span lang="de">Björn Höhrmann</span>,
dbaron@3417 1156 Paul Irish,
dbaron@3418 1157 Vitor Menezes,
dbaron@2977 1158 Alex Mogilevsky,
dbaron@2974 1159 Chris Moschini,
dbaron@6740 1160 Simon Sapin,
dbaron@2974 1161 Ben Ward,
dbaron@2974 1162 Zack Weinberg,
dbaron@3430 1163 Estelle Weyl,
dbaron@2974 1164 Boris Zbarsky,
dbaron@2974 1165 and all the rest of the <a href="http://lists.w3.org/Archives/Public/www-style/">www-style</a> community.
dbaron@2974 1166
dbaron@2974 1167 </p>
dbaron@2974 1168
jackalmage@6617 1169 <h2 class=no-num id="references">References</h2>
dbaron@2974 1170
dbaron@2974 1171
jackalmage@6617 1172 <h3 class="no-num" id="normative-references">Normative references</h3>
dbaron@2974 1173 <!--normative-->
dbaron@2974 1174
jackalmage@6617 1175 <h3 class="no-num" id="other-references">Other references</h3>
dbaron@2974 1176 <!--informative-->
dbaron@2974 1177
jackalmage@6617 1178 <h2 class="no-num" id="index">Index</h2>
dbaron@2974 1179 <!--index-->
dbaron@2974 1180
dbaron@2974 1181 </body>
dbaron@2974 1182 </html>
dbaron@2974 1183 <!-- Keep this comment at the end of the file
dbaron@2974 1184 Local variables:
dbaron@2974 1185 mode: sgml
dbaron@2974 1186 sgml-declaration:"~/SGML/HTML4.decl"
dbaron@2974 1187 sgml-default-doctype-name:"html"
dbaron@2974 1188 sgml-minimize-attributes:t
dbaron@2974 1189 sgml-nofill-elements:("pre" "style" "br")
dbaron@2974 1190 sgml-live-element-indicator:t
dbaron@2974 1191 sgml-omittag:nil
dbaron@2974 1192 sgml-shorttag:nil
dbaron@2974 1193 sgml-namecase-general:t
dbaron@2974 1194 sgml-general-insert-case:lower
dbaron@2974 1195 sgml-always-quote-attributes:t
dbaron@2974 1196 sgml-indent-step:nil
dbaron@2974 1197 sgml-indent-data:t
dbaron@2974 1198 sgml-parent-document:nil
dbaron@2974 1199 sgml-exposed-tags:nil
dbaron@2974 1200 sgml-local-catalogs:nil
dbaron@2974 1201 sgml-local-ecat-files:nil
dbaron@2974 1202 End:
dbaron@2974 1203 -->
dbaron@2974 1204

mercurial