Fri, 31 Aug 2012 12:31:28 -0700
[css3-conditional] Add the CSSConditionRule interface, redefine CSSMediaRule and CSSSupportsRule in terms of it, add CSSDocumentRule.
css3-conditional/Overview.html | file | annotate | diff | comparison | revisions | |
css3-conditional/Overview.src.html | file | annotate | diff | comparison | revisions |
1.1 --- a/css3-conditional/Overview.html Fri Aug 31 11:57:12 2012 -0700 1.2 +++ b/css3-conditional/Overview.html Fri Aug 31 12:31:28 2012 -0700 1.3 @@ -213,10 +213,19 @@ 1.4 <li><a href="#extentions-to-cssrule-interface"><span class=secno>8.1. 1.5 </span> Extensions to the <code>CSSRule</code> interface</a> 1.6 1.7 - <li><a href="#the-csssupportsrule-interface"><span class=secno>8.2. 1.8 + <li><a href="#the-cssconditionrule-interface"><span class=secno>8.2. 1.9 + </span> The <code>CSSConditionRule</code> interface</a> 1.10 + 1.11 + <li><a href="#the-cssmediarule-interface"><span class=secno>8.3. </span> 1.12 + The <code>CSSMediaRule</code> interface</a> 1.13 + 1.14 + <li><a href="#the-csssupportsrule-interface"><span class=secno>8.4. 1.15 </span> The <code>CSSSupportsRule</code> interface</a> 1.16 1.17 - <li><a href="#window-api"><span class=secno>8.3. </span>supportsCSS() 1.18 + <li><a href="#the-cssdocumentrule-interface"><span class=secno>8.5. 1.19 + </span> The <code>CSSDocumentRule</code> interface</a> 1.20 + 1.21 + <li><a href="#window-api"><span class=secno>8.6. </span>supportsCSS() 1.22 function</a> 1.23 </ul> 1.24 1.25 @@ -1064,17 +1073,14 @@ 1.26 const unsigned short DOCUMENT_RULE = 13; 1.27 }</pre> 1.28 1.29 - <h3 id=the-csssupportsrule-interface><span class=secno>8.2. </span> The 1.30 - <code>CSSSupportsRule</code> interface</h3> 1.31 + <h3 id=the-cssconditionrule-interface><span class=secno>8.2. </span> The <a 1.32 + href="#cssconditionrule"><code>CSSConditionRule</code></a> interface</h3> 1.33 1.34 - <p class=issue>Should there be an interface containing the methods common 1.35 - to CSSMediaRule, CSSSupportsRule, and CSSDocumentRule, from which they all 1.36 - derive? Should it be called CSSGroupRule? CSSConditionalRule? 1.37 + <p>The <dfn id=cssconditionrule><code>CSSConditionRule</code></dfn> 1.38 + interface represents all the "conditional" rules, which consist of a 1.39 + condition and other rules nested inside of it. 1.40 1.41 - <p>The <code>CSSSupportsRule</code> interface represents a ‘<a 1.42 - href="#dfn-support"><code class=css>@supports</code></a>’ rule. 1.43 - 1.44 - <pre class=idl>interface CSSSupportsRule : CSSRule { 1.45 + <pre class=idl>interface CSSConditionRule : CSSRule { 1.46 attribute DOMString conditionText; 1.47 readonly attribute CSSRuleList cssRules; 1.48 unsigned long insertRule (DOMString rule, unsigned long index); 1.49 @@ -1085,30 +1091,25 @@ 1.50 <dt><code>conditionText</code> of type <code>DOMString</code>, readonly 1.51 1.52 <dd>The <code>conditionText</code> attribute, on getting, must return the 1.53 - result of serializing the associated support condition. 1.54 + result of serializing the associated condition. 1.55 <p>On setting the <code>conditionText</code> attribute these steps must 1.56 be run: 1.57 1.58 <ol> 1.59 <li>Trim the given value of white space. 1.60 1.61 - <li>If the given value matches the grammar of the <a 1.62 - href="#supportscondition"><code>supports_condition</code></a> 1.63 - production, replace the associated CSS support condition with the given 1.64 - value. 1.65 + <li>If the given value matches the grammar of the appropriate condition 1.66 + production for the given rule, replace the associated CSS condition 1.67 + with the given value. 1.68 1.69 <li>Otherwise, do nothing. 1.70 </ol> 1.71 1.72 - <p class=issue>Should this be called <code>conditionText</code> or 1.73 - <code>supportsText</code>? 1.74 - 1.75 <dt><code>cssRules</code> of type <code>CSSRuleList</code>, readonly 1.76 1.77 <dd>The <code>cssRules</code> attribute must return a 1.78 - <code>CSSRuleList</code> object for the list of CSS rules specified with 1.79 - the ‘<a href="#dfn-support"><code class=css>@supports</code></a>’ 1.80 - rule. 1.81 + <code>CSSRuleList</code> object for the list of CSS rules nested inside 1.82 + the condition rule. 1.83 </dl> 1.84 1.85 <dl class=idl-methods> 1.86 @@ -1126,424 +1127,491 @@ 1.87 CSS rule list returned by <code>cssRules</code> at <var>index</var>. 1.88 </dl> 1.89 1.90 - <p class=issue>Define the CSSDocumentRule interface. 1.91 + <h3 id=the-cssmediarule-interface><span class=secno>8.3. </span> The <a 1.92 + href="#cssmediarule"><code>CSSMediaRule</code></a> interface</h3> 1.93 1.94 - <h3 id=window-api><span class=secno>8.3. </span>supportsCSS() function</h3> 1.95 + <p>The <dfn id=cssmediarule><code>CSSMediaRule</code></dfn> interface 1.96 + represents a ‘<code class=css>@media</code>’ rule: 1.97 1.98 - <pre class=idl>partial interface Window { 1.99 + <pre class=idl>interface CSSMediaRule : CSSConditionRule { 1.100 + readonly attribute MediaList media; 1.101 +}</pre> 1.102 + 1.103 + <dl class=idl-attributes> 1.104 + <dt><code>media</code> of type <code>MediaList</code>, readonly 1.105 + 1.106 + <dd>The <code>media</code> attribute must return a <code>MediaList</code> 1.107 + object for the list of media queries specified with the ‘<code 1.108 + class=css>@media</code>’ rule. 1.109 + 1.110 + <dt><code>conditionText</code> of type <code>DOMString</code>, readonly 1.111 + 1.112 + <dd>The <code>conditionText</code> attribute (defined on the <a 1.113 + href="#cssconditionrule"><code>CSSConditionRule</code></a> parent rule), 1.114 + on getting, must return the value of <code>media.mediaText</code> on the 1.115 + rule. 1.116 + <p>On setting the <code>conditionText</code> attribute these steps must 1.117 + be run: 1.118 + 1.119 + <ol> 1.120 + <li>Trim the given value of white space. 1.121 + 1.122 + <li>If the given value matches the grammar of the appropriate condition 1.123 + production for the given rule, replace the associated CSS condition 1.124 + with the given value. Also, construct a new <code>MediaList</code> 1.125 + object, passing the given value as the constructor's sole argument, and 1.126 + replace the rule's <code>media</code> attribute with it. 1.127 + 1.128 + <li>Otherwise, do nothing. 1.129 + </ol> 1.130 + 1.131 + <h3 id=the-csssupportsrule-interface><span class=secno>8.4. </span> The 1.132 + <a href="#csssupportsrule"><code>CSSSupportsRule</code></a> interface</h3> 1.133 + 1.134 + <p>The <dfn id=csssupportsrule><code>CSSSupportsRule</code></dfn> 1.135 + interface represents a ‘<a href="#dfn-support"><code 1.136 + class=css>@supports</code></a>’ rule. 1.137 + 1.138 + <pre class=idl>interface CSSSupportsRule : CSSRule { 1.139 +}</pre> 1.140 + 1.141 + <h3 id=the-cssdocumentrule-interface><span class=secno>8.5. </span> The 1.142 + <a href="#cssdocumentrule"><code>CSSDocumentRule</code></a> interface</h3> 1.143 + 1.144 + <p>The <dfn id=cssdocumentrule><code>CSSDocumentRule</code></dfn> 1.145 + interface represents a ‘<code class=css>@document</code>’ rule. 1.146 + 1.147 + <pre class=idl>interface CSSDocumentRule : CSSRule { 1.148 +}</pre> 1.149 + 1.150 + <h3 id=window-api><span class=secno>8.6. </span>supportsCSS() function</h3> 1.151 + 1.152 + <pre class=idl>partial interface Window { 1.153 boolean supportsCSS (DOMString property, DOMString value); 1.154 };</pre> 1.155 1.156 - <p>The <code>supportsCSS</code> function must return <code>true</code> if 1.157 - the implementation <a href="#dfn-support"><i>supports</i></a> the value 1.158 - given by <var>value</var> for the property given by <var>property</var>, 1.159 - and <code>false</code> otherwise. 1.160 + <p>The <code>supportsCSS</code> function must return <code>true</code> if 1.161 + the implementation <a href="#dfn-support"><i>supports</i></a> the value 1.162 + given by <var>value</var> for the property given by <var>property</var>, 1.163 + and <code>false</code> otherwise. 1.164 1.165 - <h2 id=conformance><span class=secno>9. </span>Conformance</h2> 1.166 + <h2 id=conformance><span class=secno>9. </span>Conformance</h2> 1.167 1.168 - <h3 id=base-modules><span class=secno>9.1. </span>Base Modules</h3> 1.169 + <h3 id=base-modules><span class=secno>9.1. </span>Base Modules</h3> 1.170 1.171 - <p>This specification defines conformance in terms of base modules, which 1.172 - are modules that this specification builds on top of. The base modules of 1.173 - this module are: 1.174 + <p>This specification defines conformance in terms of base modules, which 1.175 + are modules that this specification builds on top of. The base modules 1.176 + of this module are: 1.177 1.178 - <ul> 1.179 - <li><a href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> 1.180 - </ul> 1.181 - 1.182 - <p>All of the conformance requirements of all base modules are incorporated 1.183 - as conformance requirements of this module, except where overridden by 1.184 - this module. 1.185 - 1.186 - <p>Additionally, all conformance requirements related to validity of syntax 1.187 - in this module and all of its base modules are to be interpreted as though 1.188 - all syntax in all of those modules is valid. 1.189 - 1.190 - <div class=example> 1.191 - <p>For example, this means that grammar presented in modules other than <a 1.192 - href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> must obey the 1.193 - requirements that <a href="#CSS21" 1.194 - rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> defines for the parsing of 1.195 - properties, and that requirements for handling invalid syntax in <a 1.196 - href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> do not treat 1.197 - syntax added by other modules as invalid. 1.198 - </div> 1.199 - 1.200 - <p>Additionally, the set of valid syntax can be increased by the 1.201 - conformance of a style sheet or processor to additional modules; use of 1.202 - such syntax does not make a style sheet nonconformant and failure to treat 1.203 - such syntax as invalid does not make a processor nonconformant. 1.204 - 1.205 - <h3 id=conformance-classes><span class=secno>9.2. </span>Conformance 1.206 - Classes</h3> 1.207 - 1.208 - <p>Conformance to the CSS Conditional Rules Module is defined for three 1.209 - conformance classes: 1.210 - 1.211 - <dl> 1.212 - <dt><dfn id=conform-style-sheet title="conformance::style sheet">style 1.213 - sheet</dfn> 1.214 - 1.215 - <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS 1.216 - style sheet</a>. 1.217 - 1.218 - <dt><dfn id=conform-processor 1.219 - title="conformance::processor">processor</dfn> 1.220 - 1.221 - <dd>A tool that reads CSS style sheets: it may be a renderer or <a 1.222 - href="http://www.w3.org/TR/CSS21/conform.html#user-agent">user-agent</a> 1.223 - that interprets the semantics of a style sheet and renders documents that 1.224 - use style sheets, or it may be a validator that checks style sheets. 1.225 - 1.226 - <dt><dfn id=conform-authoring-tool 1.227 - title="conformance::authoring tool">authoring tool</dfn> 1.228 - 1.229 - <dd>A tool that writes a style sheet. 1.230 - </dl> 1.231 - 1.232 - <p>A style sheet is conformant to the CSS Conditional Rules Module if it 1.233 - meets all of the conformance requirements in the module that are described 1.234 - as requirements of style sheets. 1.235 - 1.236 - <p>A processor is conformant to the CSS Conditional Rules Module if it 1.237 - meets all applicable conformance requirements in the module that are 1.238 - described as requirements of processors. In general, all requirements are 1.239 - applicable to renderers. Requirements concerning a part of CSS not 1.240 - performed by a processor are not applicable, e.g., requirements related to 1.241 - rendering are not applicable to a validator. The inability of a processor 1.242 - to correctly render a document due to limitations of the device does not 1.243 - make it non-conformant. (For example, a renderer is not required to render 1.244 - color on a monochrome monitor.) 1.245 - 1.246 - <p>An authoring tool is conformant to the CSS Conditional Rules Module if 1.247 - it writes style sheets that conform to the module and (if it reads CSS) it 1.248 - is a conformant processor. 1.249 - 1.250 - <h3 id=partial><span class=secno>9.3. </span> Partial Implementations</h3> 1.251 - 1.252 - <p>So that authors can exploit the forward-compatible parsing rules to 1.253 - assign fallback values, CSS renderers <strong>must</strong> treat as 1.254 - invalid (and <a 1.255 - href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore as 1.256 - appropriate</a>) any at-rules, properties, property values, keywords, and 1.257 - other syntactic constructs for which they have no usable level of support. 1.258 - In particular, user agents <strong>must not</strong> selectively ignore 1.259 - unsupported component values and honor supported values in a single 1.260 - multi-value property declaration: if any value is considered invalid (as 1.261 - unsupported values must be), CSS requires that the entire declaration be 1.262 - ignored. 1.263 - 1.264 - <h3 id=experimental><span class=secno>9.4. </span>Experimental 1.265 - Implementations</h3> 1.266 - 1.267 - <p>To avoid clashes with future CSS features, the CSS specifications 1.268 - reserve a <a 1.269 - href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed 1.270 - syntax</a> for proprietary property and value extensions to CSS. The CSS 1.271 - Working Group recommends that experimental implementations of features in 1.272 - CSS Working Drafts also use vendor-prefixed property or value names. This 1.273 - avoids any incompatibilities with future changes in the draft. Once a 1.274 - specification reaches the Candidate Recommendation stage, implementors 1.275 - should implement the non-prefixed syntax for any feature they consider to 1.276 - be correctly implemented according to spec. 1.277 - 1.278 - <h3 id=cr-exit-criteria><span class=secno>9.5. </span>CR Exit Criteria</h3> 1.279 - 1.280 - <p>For this specification to be advanced to Proposed Recommendation, there 1.281 - must be at least two independent, interoperable implementations of each 1.282 - feature. Each feature may be implemented by a different set of products, 1.283 - there is no requirement that all features be implemented by a single 1.284 - product. For the purposes of this criterion, we define the following 1.285 - terms: 1.286 - 1.287 - <dl> 1.288 - <dt>independent 1.289 - 1.290 - <dd>each implementation must be developed by a different party and cannot 1.291 - share, reuse, or derive from code used by another qualifying 1.292 - implementation. Sections of code that have no bearing on the 1.293 - implementation of this specification are exempt from this requirement. 1.294 - 1.295 - <dt>interoperable 1.296 - 1.297 - <dd>passing the respective test case(s) in the official CSS test suite, 1.298 - or, if the implementation is not a Web browser, an equivalent test. Every 1.299 - relevant test in the test suite should have an equivalent test created if 1.300 - such a user agent (UA) is to be used to claim interoperability. In 1.301 - addition if such a UA is to be used to claim interoperability, then there 1.302 - must one or more additional UAs which can also pass those equivalent 1.303 - tests in the same way for the purpose of interoperability. The equivalent 1.304 - tests must be made publicly available for the purposes of peer review. 1.305 - 1.306 - <dt>implementation 1.307 - 1.308 - <dd>a user agent which: 1.309 - <ol class=inline> 1.310 - <li>implements the specification. 1.311 - 1.312 - <li>is available to the general public. The implementation may be a 1.313 - shipping product or other publicly available version (i.e., beta 1.314 - version, preview release, or “nightly build”). Non-shipping product 1.315 - releases must have implemented the feature(s) for a period of at least 1.316 - one month in order to demonstrate stability. 1.317 - 1.318 - <li>is not experimental (i.e., a version specifically designed to pass 1.319 - the test suite and is not intended for normal usage going forward). 1.320 - </ol> 1.321 - </dl> 1.322 - 1.323 - <p>The specification will remain Candidate Recommendation for at least six 1.324 - months. 1.325 - 1.326 - <h2 class=no-num id=grammar>Grammar</h2> 1.327 - 1.328 - <p>In order to allow these new @-rules in CSS style sheets, this 1.329 - specification modifies the <code>stylesheet</code> production in the <a 1.330 - href="http://www.w3.org/TR/CSS21/grammar.html">Appendix G</a> grammar of 1.331 - <a href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> by replacing 1.332 - the <code>media</code> production defined in <a href="#CSS21" 1.333 - rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> with the <code>media</code> 1.334 - production defined in this one, and additionally inserting <code>| 1.335 - supports_rule | document_rule</code> alongside <code>ruleset | media | 1.336 - page</code>. 1.337 - 1.338 - <h2 class=no-num id=acknowledgments>Acknowledgments</h2> 1.339 - 1.340 - <p> Thanks to the ideas and feedback from Tab Atkins, <span lang=tr>Tantek 1.341 - Çelik</span>, Alex Danilo, Elika Etemad, Pascal Germroth, <span 1.342 - lang=de>Björn Höhrmann</span>, Paul Irish, Vitor Menezes, Alex 1.343 - Mogilevsky, Chris Moschini, Ben Ward, Zack Weinberg, Estelle Weyl, Boris 1.344 - Zbarsky, and all the rest of the <a 1.345 - href="http://lists.w3.org/Archives/Public/www-style/">www-style</a> 1.346 - community. 1.347 - 1.348 - <h2 class=no-num id=references>References</h2> 1.349 - 1.350 - <h3 class=no-num id=normative-references>Normative references</h3> 1.351 - <!--begin-normative--> 1.352 - <!-- Sorted by label --> 1.353 - 1.354 - <dl class=bibliography> 1.355 - <dt style="display: none"><!-- keeps the doc valid if the DL is empty --> 1.356 - <!----> 1.357 - 1.358 - <dt id=CSS21>[CSS21] 1.359 - 1.360 - <dd>Bert Bos; et al. <a 1.361 - href="http://www.w3.org/TR/2011/REC-CSS2-20110607"><cite>Cascading Style 1.362 - Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7 June 1.363 - 2011. W3C Recommendation. URL: <a 1.364 - href="http://www.w3.org/TR/2011/REC-CSS2-20110607">http://www.w3.org/TR/2011/REC-CSS2-20110607</a> 1.365 - </dd> 1.366 - <!----> 1.367 - 1.368 - <dt id=CSS3-ANIMATIONS>[CSS3-ANIMATIONS] 1.369 - 1.370 - <dd>Dean Jackson; et al. <a 1.371 - href="http://www.w3.org/TR/2012/WD-css3-animations-20120403/"><cite>CSS 1.372 - Animations.</cite></a> 3 April 2012. W3C Working Draft. (Work in 1.373 - progress.) URL: <a 1.374 - href="http://www.w3.org/TR/2012/WD-css3-animations-20120403/">http://www.w3.org/TR/2012/WD-css3-animations-20120403/</a> 1.375 - </dd> 1.376 - <!----> 1.377 - 1.378 - <dt id=CSS3-FONTS>[CSS3-FONTS] 1.379 - 1.380 - <dd>John Daggett. <a 1.381 - href="http://www.w3.org/TR/2012/WD-css3-fonts-20120823/"><cite>CSS Fonts 1.382 - Module Level 3.</cite></a> 23 August 2012. W3C Working Draft. (Work in 1.383 - progress.) URL: <a 1.384 - href="http://www.w3.org/TR/2012/WD-css3-fonts-20120823/">http://www.w3.org/TR/2012/WD-css3-fonts-20120823/</a> 1.385 - </dd> 1.386 - <!----> 1.387 - 1.388 - <dt id=ECMA-262-5.1>[ECMA-262-5.1] 1.389 - 1.390 - <dd><a 1.391 - href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><cite>ECMAScript 1.392 - Language Specification, Edition 5.1.</cite></a> June 2011. ISO/IEC 1.393 - 16262:2011. URL: <a 1.394 - href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">http://www.ecma-international.org/publications/standards/Ecma-262.htm</a> 1.395 - </dd> 1.396 - <!----> 1.397 - 1.398 - <dt id=MEDIAQ>[MEDIAQ] 1.399 - 1.400 - <dd>Florian Rivoal. <a 1.401 - href="http://www.w3.org/TR/2012/REC-css3-mediaqueries-20120619/"><cite>Media 1.402 - Queries.</cite></a> 19 June 2012. W3C Recommendation. URL: <a 1.403 - href="http://www.w3.org/TR/2012/REC-css3-mediaqueries-20120619/">http://www.w3.org/TR/2012/REC-css3-mediaqueries-20120619/</a> 1.404 - </dd> 1.405 - <!----> 1.406 - 1.407 - <dt id=RFC2119>[RFC2119] 1.408 - 1.409 - <dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key 1.410 - words for use in RFCs to Indicate Requirement Levels.</cite></a> Internet 1.411 - RFC 2119. URL: <a 1.412 - href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a> 1.413 - </dd> 1.414 - <!----> 1.415 - 1.416 - <dt id=URI>[URI] 1.417 - 1.418 - <dd>T. Berners-Lee; R. Fielding; L. Masinter. <a 1.419 - href="http://www.ietf.org/rfc/rfc3986.txt"><cite>Uniform Resource 1.420 - Identifiers (URI): generic syntax.</cite></a> January 2005. Internet RFC 1.421 - 3986. URL: <a 1.422 - href="http://www.ietf.org/rfc/rfc3986.txt">http://www.ietf.org/rfc/rfc3986.txt</a> 1.423 - </dd> 1.424 - <!----> 1.425 - </dl> 1.426 - <!--end-normative--> 1.427 - 1.428 - <h3 class=no-num id=other-references>Other references</h3> 1.429 - <!--begin-informative--> 1.430 - <!-- Sorted by label --> 1.431 - 1.432 - <dl class=bibliography> 1.433 - <dt style="display: none"><!-- keeps the doc valid if the DL is empty --> 1.434 - <!----> 1.435 - 1.436 - <dt id=CSS1>[CSS1] 1.437 - 1.438 - <dd>Håkon Wium Lie; Bert Bos. <a 1.439 - href="http://www.w3.org/TR/2008/REC-CSS1-20080411"><cite>Cascading Style 1.440 - Sheets (CSS1) Level 1 Specification.</cite></a> 11 April 2008. W3C 1.441 - Recommendation. URL: <a 1.442 - href="http://www.w3.org/TR/2008/REC-CSS1-20080411">http://www.w3.org/TR/2008/REC-CSS1-20080411</a> 1.443 - </dd> 1.444 - <!----> 1.445 - 1.446 - <dt id=CSS3-TRANSITIONS>[CSS3-TRANSITIONS] 1.447 - 1.448 - <dd>Dean Jackson; et al. <a 1.449 - href="http://www.w3.org/TR/2012/WD-css3-transitions-20120403/"><cite>CSS 1.450 - Transitions.</cite></a> 3 April 2012. W3C Working Draft. (Work in 1.451 - progress.) URL: <a 1.452 - href="http://www.w3.org/TR/2012/WD-css3-transitions-20120403/">http://www.w3.org/TR/2012/WD-css3-transitions-20120403/</a> 1.453 - </dd> 1.454 - <!----> 1.455 - 1.456 - <dt id=HTML5>[HTML5] 1.457 - 1.458 - <dd>Ian Hickson. <a 1.459 - href="http://www.w3.org/TR/2011/WD-html5-20110525/"><cite>HTML5.</cite></a> 1.460 - 25 May 2011. W3C Working Draft. (Work in progress.) URL: <a 1.461 - href="http://www.w3.org/TR/2011/WD-html5-20110525/">http://www.w3.org/TR/2011/WD-html5-20110525/</a> 1.462 - </dd> 1.463 - <!----> 1.464 - 1.465 - <dt id=SVG11>[SVG11] 1.466 - 1.467 - <dd>Erik Dahlström; et al. <a 1.468 - href="http://www.w3.org/TR/2011/REC-SVG11-20110816/"><cite>Scalable 1.469 - Vector Graphics (SVG) 1.1 (Second Edition).</cite></a> 16 August 2011. 1.470 - W3C Recommendation. URL: <a 1.471 - href="http://www.w3.org/TR/2011/REC-SVG11-20110816/">http://www.w3.org/TR/2011/REC-SVG11-20110816/</a> 1.472 - </dd> 1.473 - <!----> 1.474 - </dl> 1.475 - <!--end-informative--> 1.476 - 1.477 - <h2 class=no-num id=index>Index</h2> 1.478 - <!--begin-index--> 1.479 - 1.480 - <ul class=indexlist> 1.481 - <li>conditional group rules, <a href="#conditional-group-rules" 1.482 - title="conditional group rules"><strong>2.</strong></a> 1.483 - 1.484 - <li>conformance 1.485 <ul> 1.486 - <li>authoring tool, <a href="#conform-authoring-tool" 1.487 - title="conformance, authoring tool"><strong>9.2.</strong></a> 1.488 - 1.489 - <li>processor, <a href="#conform-processor" 1.490 - title="conformance, processor"><strong>9.2.</strong></a> 1.491 - 1.492 - <li>style sheet, <a href="#conform-style-sheet" 1.493 - title="conformance, style sheet"><strong>9.2.</strong></a> 1.494 + <li><a href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> 1.495 </ul> 1.496 1.497 - <li>‘<code class=css>@document</code>’ rule, <a href="#document-rule" 1.498 - title="'@document' rule"><strong>7.</strong></a> 1.499 + <p>All of the conformance requirements of all base modules are 1.500 + incorporated as conformance requirements of this module, except where 1.501 + overridden by this module. 1.502 1.503 - <li>domain(), <a href="#url-domain" 1.504 - title="domain()"><strong>7.</strong></a> 1.505 + <p>Additionally, all conformance requirements related to validity of 1.506 + syntax in this module and all of its base modules are to be interpreted 1.507 + as though all syntax in all of those modules is valid. 1.508 1.509 - <li>domain matching function, <a href="#domain-matching-function" 1.510 - title="domain matching function"><strong>7.</strong></a> 1.511 + <div class=example> 1.512 + <p>For example, this means that grammar presented in modules other than 1.513 + <a href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> must obey 1.514 + the requirements that <a href="#CSS21" 1.515 + rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> defines for the parsing of 1.516 + properties, and that requirements for handling invalid syntax in <a 1.517 + href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> do not treat 1.518 + syntax added by other modules as invalid. 1.519 + </div> 1.520 1.521 - <li>exact url matching function, <a href="#exact-url-matching-function" 1.522 - title="exact url matching function"><strong>7.</strong></a> 1.523 + <p>Additionally, the set of valid syntax can be increased by the 1.524 + conformance of a style sheet or processor to additional modules; use of 1.525 + such syntax does not make a style sheet nonconformant and failure to 1.526 + treat such syntax as invalid does not make a processor nonconformant. 1.527 1.528 - <li>group rule body, <a href="#group-rule-body" 1.529 - title="group rule body"><strong>3.</strong></a> 1.530 + <h3 id=conformance-classes><span class=secno>9.2. </span>Conformance 1.531 + Classes</h3> 1.532 1.533 - <li>‘<code class=css>@media</code>’ rule, <a href="#media-rule" 1.534 - title="'@media' rule"><strong>5.</strong></a> 1.535 + <p>Conformance to the CSS Conditional Rules Module is defined for three 1.536 + conformance classes: 1.537 1.538 - <li>regexp(), <a href="#url-regexp" 1.539 - title="regexp()"><strong>7.</strong></a> 1.540 + <dl> 1.541 + <dt><dfn id=conform-style-sheet title="conformance::style sheet">style 1.542 + sheet</dfn> 1.543 1.544 - <li>support, <a href="#dfn-support" 1.545 - title=support><strong>6.1.</strong></a> 1.546 + <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS 1.547 + style sheet</a>. 1.548 1.549 - <li>supports_condition, <a href="#supportscondition" 1.550 - title="supports_condition"><strong>6.</strong></a> 1.551 + <dt><dfn id=conform-processor 1.552 + title="conformance::processor">processor</dfn> 1.553 1.554 - <li>supports_condition_in_parens, <a href="#supportsconditioninparens" 1.555 - title="supports_condition_in_parens"><strong>6.</strong></a> 1.556 + <dd>A tool that reads CSS style sheets: it may be a renderer or <a 1.557 + href="http://www.w3.org/TR/CSS21/conform.html#user-agent">user-agent</a> 1.558 + that interprets the semantics of a style sheet and renders documents 1.559 + that use style sheets, or it may be a validator that checks style 1.560 + sheets. 1.561 1.562 - <li>supports_conjunction, <a href="#supportsconjunction" 1.563 - title="supports_conjunction"><strong>6.</strong></a> 1.564 + <dt><dfn id=conform-authoring-tool 1.565 + title="conformance::authoring tool">authoring tool</dfn> 1.566 1.567 - <li>supports_declaration_condition, <a 1.568 - href="#supportsdeclarationcondition" 1.569 - title="supports_declaration_condition"><strong>6.</strong></a> 1.570 + <dd>A tool that writes a style sheet. 1.571 + </dl> 1.572 1.573 - <li>supports_disjunction, <a href="#supportsdisjunction" 1.574 - title="supports_disjunction"><strong>6.</strong></a> 1.575 + <p>A style sheet is conformant to the CSS Conditional Rules Module if it 1.576 + meets all of the conformance requirements in the module that are 1.577 + described as requirements of style sheets. 1.578 1.579 - <li>supports_negation, <a href="#supportsnegation" 1.580 - title="supports_negation"><strong>6.</strong></a> 1.581 + <p>A processor is conformant to the CSS Conditional Rules Module if it 1.582 + meets all applicable conformance requirements in the module that are 1.583 + described as requirements of processors. In general, all requirements 1.584 + are applicable to renderers. Requirements concerning a part of CSS not 1.585 + performed by a processor are not applicable, e.g., requirements related 1.586 + to rendering are not applicable to a validator. The inability of a 1.587 + processor to correctly render a document due to limitations of the 1.588 + device does not make it non-conformant. (For example, a renderer is not 1.589 + required to render color on a monochrome monitor.) 1.590 1.591 - <li>‘<a href="#dfn-support"><code class=css>@supports</code></a>’ 1.592 - rule, <a href="#supports-rule" 1.593 - title="'@supports' rule"><strong>6.</strong></a> 1.594 + <p>An authoring tool is conformant to the CSS Conditional Rules Module if 1.595 + it writes style sheets that conform to the module and (if it reads CSS) 1.596 + it is a conformant processor. 1.597 1.598 - <li>supports_rule, <a href="#supportsrule" 1.599 - title="supports_rule"><strong>6.</strong></a> 1.600 + <h3 id=partial><span class=secno>9.3. </span> Partial Implementations</h3> 1.601 1.602 - <li>url(), <a href="#url-exact" title="url()"><strong>7.</strong></a> 1.603 + <p>So that authors can exploit the forward-compatible parsing rules to 1.604 + assign fallback values, CSS renderers <strong>must</strong> treat as 1.605 + invalid (and <a 1.606 + href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore as 1.607 + appropriate</a>) any at-rules, properties, property values, keywords, 1.608 + and other syntactic constructs for which they have no usable level of 1.609 + support. In particular, user agents <strong>must not</strong> 1.610 + selectively ignore unsupported component values and honor supported 1.611 + values in a single multi-value property declaration: if any value is 1.612 + considered invalid (as unsupported values must be), CSS requires that 1.613 + the entire declaration be ignored. 1.614 1.615 - <li>URL matching functions, <a href="#url-matching-functions" 1.616 - title="URL matching functions"><strong>7.</strong></a> 1.617 - <ul> 1.618 - <li>domain, <a href="#url-domain" 1.619 - title="URL matching functions, domain"><strong>7.</strong></a> 1.620 + <h3 id=experimental><span class=secno>9.4. </span>Experimental 1.621 + Implementations</h3> 1.622 1.623 - <li>exact, <a href="#url-exact" 1.624 - title="URL matching functions, exact"><strong>7.</strong></a> 1.625 + <p>To avoid clashes with future CSS features, the CSS specifications 1.626 + reserve a <a 1.627 + href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed 1.628 + syntax</a> for proprietary property and value extensions to CSS. The CSS 1.629 + Working Group recommends that experimental implementations of features 1.630 + in CSS Working Drafts also use vendor-prefixed property or value names. 1.631 + This avoids any incompatibilities with future changes in the draft. Once 1.632 + a specification reaches the Candidate Recommendation stage, implementors 1.633 + should implement the non-prefixed syntax for any feature they consider 1.634 + to be correctly implemented according to spec. 1.635 1.636 - <li>prefix, <a href="#url-prefix" 1.637 - title="URL matching functions, prefix"><strong>7.</strong></a> 1.638 + <h3 id=cr-exit-criteria><span class=secno>9.5. </span>CR Exit Criteria</h3> 1.639 1.640 - <li>regular expression, <a href="#url-regexp" 1.641 - title="URL matching functions, regular expression"><strong>7.</strong></a> 1.642 + <p>For this specification to be advanced to Proposed Recommendation, 1.643 + there must be at least two independent, interoperable implementations of 1.644 + each feature. Each feature may be implemented by a different set of 1.645 + products, there is no requirement that all features be implemented by a 1.646 + single product. For the purposes of this criterion, we define the 1.647 + following terms: 1.648 + 1.649 + <dl> 1.650 + <dt>independent 1.651 + 1.652 + <dd>each implementation must be developed by a different party and 1.653 + cannot share, reuse, or derive from code used by another qualifying 1.654 + implementation. Sections of code that have no bearing on the 1.655 + implementation of this specification are exempt from this requirement. 1.656 + 1.657 + <dt>interoperable 1.658 + 1.659 + <dd>passing the respective test case(s) in the official CSS test suite, 1.660 + or, if the implementation is not a Web browser, an equivalent test. 1.661 + Every relevant test in the test suite should have an equivalent test 1.662 + created if such a user agent (UA) is to be used to claim 1.663 + interoperability. In addition if such a UA is to be used to claim 1.664 + interoperability, then there must one or more additional UAs which can 1.665 + also pass those equivalent tests in the same way for the purpose of 1.666 + interoperability. The equivalent tests must be made publicly available 1.667 + for the purposes of peer review. 1.668 + 1.669 + <dt>implementation 1.670 + 1.671 + <dd>a user agent which: 1.672 + <ol class=inline> 1.673 + <li>implements the specification. 1.674 + 1.675 + <li>is available to the general public. The implementation may be a 1.676 + shipping product or other publicly available version (i.e., beta 1.677 + version, preview release, or “nightly build”). Non-shipping 1.678 + product releases must have implemented the feature(s) for a period of 1.679 + at least one month in order to demonstrate stability. 1.680 + 1.681 + <li>is not experimental (i.e., a version specifically designed to pass 1.682 + the test suite and is not intended for normal usage going forward). 1.683 + </ol> 1.684 + </dl> 1.685 + 1.686 + <p>The specification will remain Candidate Recommendation for at least 1.687 + six months. 1.688 + 1.689 + <h2 class=no-num id=grammar>Grammar</h2> 1.690 + 1.691 + <p>In order to allow these new @-rules in CSS style sheets, this 1.692 + specification modifies the <code>stylesheet</code> production in the <a 1.693 + href="http://www.w3.org/TR/CSS21/grammar.html">Appendix G</a> grammar of 1.694 + <a href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> by 1.695 + replacing the <code>media</code> production defined in <a href="#CSS21" 1.696 + rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> with the <code>media</code> 1.697 + production defined in this one, and additionally inserting <code>| 1.698 + supports_rule | document_rule</code> alongside <code>ruleset | media | 1.699 + page</code>. 1.700 + 1.701 + <h2 class=no-num id=acknowledgments>Acknowledgments</h2> 1.702 + 1.703 + <p> Thanks to the ideas and feedback from Tab Atkins, <span 1.704 + lang=tr>Tantek Çelik</span>, Alex Danilo, Elika Etemad, Pascal 1.705 + Germroth, <span lang=de>Björn Höhrmann</span>, Paul Irish, Vitor 1.706 + Menezes, Alex Mogilevsky, Chris Moschini, Ben Ward, Zack Weinberg, 1.707 + Estelle Weyl, Boris Zbarsky, and all the rest of the <a 1.708 + href="http://lists.w3.org/Archives/Public/www-style/">www-style</a> 1.709 + community. 1.710 + 1.711 + <h2 class=no-num id=references>References</h2> 1.712 + 1.713 + <h3 class=no-num id=normative-references>Normative references</h3> 1.714 + <!--begin-normative--> <!-- Sorted by label --> 1.715 + <dl class=bibliography> 1.716 + <dt 1.717 + style="display: none"><!-- keeps the doc valid if the DL is empty --> 1.718 + <!----> 1.719 + 1.720 + <dt id=CSS21>[CSS21] 1.721 + 1.722 + <dd>Bert Bos; et al. <a 1.723 + href="http://www.w3.org/TR/2011/REC-CSS2-20110607"><cite>Cascading 1.724 + Style Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7 1.725 + June 2011. W3C Recommendation. URL: <a 1.726 + href="http://www.w3.org/TR/2011/REC-CSS2-20110607">http://www.w3.org/TR/2011/REC-CSS2-20110607</a> 1.727 + </dd> 1.728 + <!----> 1.729 + 1.730 + <dt id=CSS3-ANIMATIONS>[CSS3-ANIMATIONS] 1.731 + 1.732 + <dd>Dean Jackson; et al. <a 1.733 + href="http://www.w3.org/TR/2012/WD-css3-animations-20120403/"><cite>CSS 1.734 + Animations.</cite></a> 3 April 2012. W3C Working Draft. (Work in 1.735 + progress.) URL: <a 1.736 + href="http://www.w3.org/TR/2012/WD-css3-animations-20120403/">http://www.w3.org/TR/2012/WD-css3-animations-20120403/</a> 1.737 + </dd> 1.738 + <!----> 1.739 + 1.740 + <dt id=CSS3-FONTS>[CSS3-FONTS] 1.741 + 1.742 + <dd>John Daggett. <a 1.743 + href="http://www.w3.org/TR/2012/WD-css3-fonts-20120823/"><cite>CSS 1.744 + Fonts Module Level 3.</cite></a> 23 August 2012. W3C Working Draft. 1.745 + (Work in progress.) URL: <a 1.746 + href="http://www.w3.org/TR/2012/WD-css3-fonts-20120823/">http://www.w3.org/TR/2012/WD-css3-fonts-20120823/</a> 1.747 + </dd> 1.748 + <!----> 1.749 + 1.750 + <dt id=ECMA-262-5.1>[ECMA-262-5.1] 1.751 + 1.752 + <dd><a 1.753 + href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><cite>ECMAScript 1.754 + Language Specification, Edition 5.1.</cite></a> June 2011. ISO/IEC 1.755 + 16262:2011. URL: <a 1.756 + href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">http://www.ecma-international.org/publications/standards/Ecma-262.htm</a> 1.757 + </dd> 1.758 + <!----> 1.759 + 1.760 + <dt id=MEDIAQ>[MEDIAQ] 1.761 + 1.762 + <dd>Florian Rivoal. <a 1.763 + href="http://www.w3.org/TR/2012/REC-css3-mediaqueries-20120619/"><cite>Media 1.764 + Queries.</cite></a> 19 June 2012. W3C Recommendation. URL: <a 1.765 + href="http://www.w3.org/TR/2012/REC-css3-mediaqueries-20120619/">http://www.w3.org/TR/2012/REC-css3-mediaqueries-20120619/</a> 1.766 + </dd> 1.767 + <!----> 1.768 + 1.769 + <dt id=RFC2119>[RFC2119] 1.770 + 1.771 + <dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key 1.772 + words for use in RFCs to Indicate Requirement Levels.</cite></a> 1.773 + Internet RFC 2119. URL: <a 1.774 + href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a> 1.775 + </dd> 1.776 + <!----> 1.777 + 1.778 + <dt id=URI>[URI] 1.779 + 1.780 + <dd>T. Berners-Lee; R. Fielding; L. Masinter. <a 1.781 + href="http://www.ietf.org/rfc/rfc3986.txt"><cite>Uniform Resource 1.782 + Identifiers (URI): generic syntax.</cite></a> January 2005. Internet 1.783 + RFC 3986. URL: <a 1.784 + href="http://www.ietf.org/rfc/rfc3986.txt">http://www.ietf.org/rfc/rfc3986.txt</a> 1.785 + </dd> 1.786 + <!----> 1.787 + </dl> 1.788 + <!--end-normative--> 1.789 + <h3 class=no-num id=other-references>Other references</h3> 1.790 + <!--begin-informative--> <!-- Sorted by label --> 1.791 + <dl class=bibliography> 1.792 + <dt 1.793 + style="display: none"><!-- keeps the doc valid if the DL is empty --> 1.794 + <!----> 1.795 + 1.796 + <dt id=CSS1>[CSS1] 1.797 + 1.798 + <dd>Håkon Wium Lie; Bert Bos. <a 1.799 + href="http://www.w3.org/TR/2008/REC-CSS1-20080411"><cite>Cascading 1.800 + Style Sheets (CSS1) Level 1 Specification.</cite></a> 11 April 2008. 1.801 + W3C Recommendation. URL: <a 1.802 + href="http://www.w3.org/TR/2008/REC-CSS1-20080411">http://www.w3.org/TR/2008/REC-CSS1-20080411</a> 1.803 + </dd> 1.804 + <!----> 1.805 + 1.806 + <dt id=CSS3-TRANSITIONS>[CSS3-TRANSITIONS] 1.807 + 1.808 + <dd>Dean Jackson; et al. <a 1.809 + href="http://www.w3.org/TR/2012/WD-css3-transitions-20120403/"><cite>CSS 1.810 + Transitions.</cite></a> 3 April 2012. W3C Working Draft. (Work in 1.811 + progress.) URL: <a 1.812 + href="http://www.w3.org/TR/2012/WD-css3-transitions-20120403/">http://www.w3.org/TR/2012/WD-css3-transitions-20120403/</a> 1.813 + </dd> 1.814 + <!----> 1.815 + 1.816 + <dt id=HTML5>[HTML5] 1.817 + 1.818 + <dd>Ian Hickson. <a 1.819 + href="http://www.w3.org/TR/2011/WD-html5-20110525/"><cite>HTML5.</cite></a> 1.820 + 25 May 2011. W3C Working Draft. (Work in progress.) URL: <a 1.821 + href="http://www.w3.org/TR/2011/WD-html5-20110525/">http://www.w3.org/TR/2011/WD-html5-20110525/</a> 1.822 + </dd> 1.823 + <!----> 1.824 + 1.825 + <dt id=SVG11>[SVG11] 1.826 + 1.827 + <dd>Erik Dahlström; et al. <a 1.828 + href="http://www.w3.org/TR/2011/REC-SVG11-20110816/"><cite>Scalable 1.829 + Vector Graphics (SVG) 1.1 (Second Edition).</cite></a> 16 August 2011. 1.830 + W3C Recommendation. URL: <a 1.831 + href="http://www.w3.org/TR/2011/REC-SVG11-20110816/">http://www.w3.org/TR/2011/REC-SVG11-20110816/</a> 1.832 + </dd> 1.833 + <!----> 1.834 + </dl> 1.835 + <!--end-informative--> 1.836 + <h2 class=no-num id=index>Index</h2> 1.837 + <!--begin-index--> 1.838 + <ul class=indexlist> 1.839 + <li>conditional group rules, <a href="#conditional-group-rules" 1.840 + title="conditional group rules"><strong>2.</strong></a> 1.841 + 1.842 + <li>conformance 1.843 + <ul> 1.844 + <li>authoring tool, <a href="#conform-authoring-tool" 1.845 + title="conformance, authoring tool"><strong>9.2.</strong></a> 1.846 + 1.847 + <li>processor, <a href="#conform-processor" 1.848 + title="conformance, processor"><strong>9.2.</strong></a> 1.849 + 1.850 + <li>style sheet, <a href="#conform-style-sheet" 1.851 + title="conformance, style sheet"><strong>9.2.</strong></a> 1.852 + </ul> 1.853 + 1.854 + <li><a href="#cssconditionrule"><code>CSSConditionRule</code></a>, <a 1.855 + href="#cssconditionrule" 1.856 + title=CSSConditionRule><strong>8.2.</strong></a> 1.857 + 1.858 + <li><a href="#cssdocumentrule"><code>CSSDocumentRule</code></a>, <a 1.859 + href="#cssdocumentrule" title=CSSDocumentRule><strong>8.5.</strong></a> 1.860 + 1.861 + <li><a href="#cssmediarule"><code>CSSMediaRule</code></a>, <a 1.862 + href="#cssmediarule" title=CSSMediaRule><strong>8.3.</strong></a> 1.863 + 1.864 + <li><a href="#csssupportsrule"><code>CSSSupportsRule</code></a>, <a 1.865 + href="#csssupportsrule" title=CSSSupportsRule><strong>8.4.</strong></a> 1.866 + 1.867 + <li>‘<code class=css>@document</code>’ rule, <a 1.868 + href="#document-rule" title="'@document' rule"><strong>7.</strong></a> 1.869 + 1.870 + <li>domain(), <a href="#url-domain" 1.871 + title="domain()"><strong>7.</strong></a> 1.872 + 1.873 + <li>domain matching function, <a href="#domain-matching-function" 1.874 + title="domain matching function"><strong>7.</strong></a> 1.875 + 1.876 + <li>exact url matching function, <a href="#exact-url-matching-function" 1.877 + title="exact url matching function"><strong>7.</strong></a> 1.878 + 1.879 + <li>group rule body, <a href="#group-rule-body" 1.880 + title="group rule body"><strong>3.</strong></a> 1.881 + 1.882 + <li>‘<code class=css>@media</code>’ rule, <a href="#media-rule" 1.883 + title="'@media' rule"><strong>5.</strong></a> 1.884 + 1.885 + <li>regexp(), <a href="#url-regexp" 1.886 + title="regexp()"><strong>7.</strong></a> 1.887 + 1.888 + <li>support, <a href="#dfn-support" 1.889 + title=support><strong>6.1.</strong></a> 1.890 + 1.891 + <li>supports_condition, <a href="#supportscondition" 1.892 + title="supports_condition"><strong>6.</strong></a> 1.893 + 1.894 + <li>supports_condition_in_parens, <a href="#supportsconditioninparens" 1.895 + title="supports_condition_in_parens"><strong>6.</strong></a> 1.896 + 1.897 + <li>supports_conjunction, <a href="#supportsconjunction" 1.898 + title="supports_conjunction"><strong>6.</strong></a> 1.899 + 1.900 + <li>supports_declaration_condition, <a 1.901 + href="#supportsdeclarationcondition" 1.902 + title="supports_declaration_condition"><strong>6.</strong></a> 1.903 + 1.904 + <li>supports_disjunction, <a href="#supportsdisjunction" 1.905 + title="supports_disjunction"><strong>6.</strong></a> 1.906 + 1.907 + <li>supports_negation, <a href="#supportsnegation" 1.908 + title="supports_negation"><strong>6.</strong></a> 1.909 + 1.910 + <li>‘<a href="#dfn-support"><code class=css>@supports</code></a>’ 1.911 + rule, <a href="#supports-rule" 1.912 + title="'@supports' rule"><strong>6.</strong></a> 1.913 + 1.914 + <li>supports_rule, <a href="#supportsrule" 1.915 + title="supports_rule"><strong>6.</strong></a> 1.916 + 1.917 + <li>url(), <a href="#url-exact" title="url()"><strong>7.</strong></a> 1.918 + 1.919 + <li>URL matching functions, <a href="#url-matching-functions" 1.920 + title="URL matching functions"><strong>7.</strong></a> 1.921 + <ul> 1.922 + <li>domain, <a href="#url-domain" 1.923 + title="URL matching functions, domain"><strong>7.</strong></a> 1.924 + 1.925 + <li>exact, <a href="#url-exact" 1.926 + title="URL matching functions, exact"><strong>7.</strong></a> 1.927 + 1.928 + <li>prefix, <a href="#url-prefix" 1.929 + title="URL matching functions, prefix"><strong>7.</strong></a> 1.930 + 1.931 + <li>regular expression, <a href="#url-regexp" 1.932 + title="URL matching functions, regular expression"><strong>7.</strong></a> 1.933 + </ul> 1.934 + 1.935 + <li>URL of the document being styled, <a 1.936 + href="#url-of-the-document-being-styled" 1.937 + title="URL of the document being styled"><strong>7.</strong></a> 1.938 + 1.939 + <li>url-prefix(), <a href="#url-prefix" 1.940 + title="url-prefix()"><strong>7.</strong></a> 1.941 + 1.942 + <li>url prefix matching function, <a 1.943 + href="#url-prefix-matching-function" 1.944 + title="url prefix matching function"><strong>7.</strong></a> 1.945 </ul> 1.946 - 1.947 - <li>URL of the document being styled, <a 1.948 - href="#url-of-the-document-being-styled" 1.949 - title="URL of the document being styled"><strong>7.</strong></a> 1.950 - 1.951 - <li>url-prefix(), <a href="#url-prefix" 1.952 - title="url-prefix()"><strong>7.</strong></a> 1.953 - 1.954 - <li>url prefix matching function, <a href="#url-prefix-matching-function" 1.955 - title="url prefix matching function"><strong>7.</strong></a> 1.956 - </ul> 1.957 - <!--end-index--> 1.958 + <!--end-index--> 1.959 + </dl> 1.960 </html> 1.961 <!-- Keep this comment at the end of the file 1.962 Local variables:
2.1 --- a/css3-conditional/Overview.src.html Fri Aug 31 11:57:12 2012 -0700 2.2 +++ b/css3-conditional/Overview.src.html Fri Aug 31 12:31:28 2012 -0700 2.3 @@ -797,16 +797,13 @@ 2.4 }</pre> 2.5 2.6 2.7 -<h3 id="the-csssupportsrule-interface"> 2.8 -The <code>CSSSupportsRule</code> interface</h3> 2.9 +<h3 id="the-cssconditionrule-interface"> 2.10 +The <code>CSSConditionRule</code> interface</h3> 2.11 2.12 -<p class="issue">Should there be an interface containing the methods 2.13 -common to CSSMediaRule, CSSSupportsRule, and CSSDocumentRule, from which 2.14 -they all derive? Should it be called CSSGroupRule? CSSConditionalRule?</p> 2.15 +<p>The <dfn><code>CSSConditionRule</code></dfn> interface represents all the "conditional" rules, 2.16 + which consist of a condition and other rules nested inside of it. 2.17 2.18 -<p>The <code>CSSSupportsRule</code> interface represents a ''@supports'' rule.</p> 2.19 - 2.20 -<pre class='idl'>interface CSSSupportsRule : CSSRule { 2.21 +<pre class='idl'>interface CSSConditionRule : CSSRule { 2.22 attribute DOMString conditionText; 2.23 readonly attribute CSSRuleList cssRules; 2.24 unsigned long insertRule (DOMString rule, unsigned long index); 2.25 @@ -816,7 +813,7 @@ 2.26 <dl class='idl-attributes'> 2.27 <dt><code>conditionText</code> of type <code>DOMString</code>, readonly 2.28 <dd>The <code>conditionText</code> attribute, on getting, must return 2.29 - the result of serializing the associated support condition. 2.30 + the result of serializing the associated condition. 2.31 2.32 <p>On setting the <code>conditionText</code> attribute these steps 2.33 must be run: 2.34 @@ -824,17 +821,14 @@ 2.35 <ol> 2.36 <li>Trim the given value of white space. 2.37 <li>If the given value matches the grammar of the 2.38 - <code>supports_condition</code> production, replace the associated 2.39 - CSS support condition with the given value. 2.40 + appropriate condition production for the given rule, 2.41 + replace the associated CSS condition with the given value. 2.42 <li>Otherwise, do nothing. 2.43 </ol> 2.44 2.45 - <p class="issue">Should this be called <code>conditionText</code> or 2.46 - <code>supportsText</code>?</p> 2.47 - 2.48 <dt><code>cssRules</code> of type <code>CSSRuleList</code>, readonly 2.49 <dd>The <code>cssRules</code> attribute must return a <code>CSSRuleList</code> 2.50 - object for the list of CSS rules specified with the ''@supports'' rule. 2.51 + object for the list of CSS rules nested inside the condition rule. 2.52 </dl> 2.53 2.54 <dl class='idl-methods'> 2.55 @@ -848,7 +842,55 @@ 2.56 CSS rule list returned by <code>cssRules</code> at <var>index</var>. 2.57 </dl> 2.58 2.59 -<p class='issue'>Define the CSSDocumentRule interface. 2.60 + 2.61 +<h3 id="the-cssmediarule-interface"> 2.62 +The <code>CSSMediaRule</code> interface</h3> 2.63 + 2.64 +<p>The <dfn><code>CSSMediaRule</code></dfn> interface represents a ''@media'' rule: 2.65 + 2.66 +<pre class='idl'>interface CSSMediaRule : CSSConditionRule { 2.67 + readonly attribute MediaList media; 2.68 +}</pre> 2.69 + 2.70 +<dl class='idl-attributes'> 2.71 + <dt><code>media</code> of type <code>MediaList</code>, readonly 2.72 + <dd>The <code>media</code> attribute must return a <code>MediaList</code> object 2.73 + for the list of media queries specified with the ''@media'' rule. 2.74 + 2.75 + <dt><code>conditionText</code> of type <code>DOMString</code>, readonly 2.76 + <dd>The <code>conditionText</code> attribute (defined on the <code>CSSConditionRule</code> parent rule), 2.77 + on getting, must return the value of <code>media.mediaText</code> on the rule. 2.78 + 2.79 + <p>On setting the <code>conditionText</code> attribute these steps must be run: 2.80 + 2.81 + <ol> 2.82 + <li>Trim the given value of white space. 2.83 + <li>If the given value matches the grammar of the 2.84 + appropriate condition production for the given rule, 2.85 + replace the associated CSS condition with the given value. 2.86 + Also, construct a new <code>MediaList</code> object, 2.87 + passing the given value as the constructor's sole argument, 2.88 + and replace the rule's <code>media</code> attribute with it. 2.89 + <li>Otherwise, do nothing. 2.90 + </ol> 2.91 + 2.92 + 2.93 +<h3 id="the-csssupportsrule-interface"> 2.94 +The <code>CSSSupportsRule</code> interface</h3> 2.95 + 2.96 +<p>The <dfn><code>CSSSupportsRule</code></dfn> interface represents a ''@supports'' rule.</p> 2.97 + 2.98 +<pre class='idl'>interface CSSSupportsRule : CSSRule { 2.99 +}</pre> 2.100 + 2.101 + 2.102 +<h3 id="the-cssdocumentrule-interface"> 2.103 +The <code>CSSDocumentRule</code> interface</h3> 2.104 + 2.105 +<p>The <dfn><code>CSSDocumentRule</code></dfn> interface represents a ''@document'' rule.</p> 2.106 + 2.107 +<pre class='idl'>interface CSSDocumentRule : CSSRule { 2.108 +}</pre> 2.109 2.110 2.111 <h3 id="window-api">supportsCSS() function</h3>