css3-conditional/Overview.src.html

changeset 6620
b06f854c5e31
parent 6619
3e2cd7f0e196
child 6621
095e8cb26579
     1.1 --- a/css3-conditional/Overview.src.html	Fri Aug 31 12:33:26 2012 -0700
     1.2 +++ b/css3-conditional/Overview.src.html	Fri Aug 31 13:30:08 2012 -0700
     1.3 @@ -800,8 +800,8 @@
     1.4  <h3 id="the-cssconditionrule-interface">
     1.5  The <code>CSSConditionRule</code> interface</h3>
     1.6  
     1.7 -<p>The <dfn><code>CSSConditionRule</code></dfn> interface represents all the "conditional" rules,
     1.8 -  which consist of a condition and other rules nested inside of it.
     1.9 +<p>The <dfn><code>CSSConditionRule</code></dfn> interface represents all the "conditional" at-rules,
    1.10 +  which consist of a condition and a statement block.
    1.11  
    1.12  <pre class='idl'>interface CSSConditionRule : CSSRule {
    1.13      attribute DOMString conditionText;
    1.14 @@ -893,15 +893,35 @@
    1.15  }</pre>
    1.16  
    1.17  
    1.18 -<h3 id="window-api">supportsCSS() function</h3>
    1.19 +<h3 id='the-css-interface'>
    1.20 +The <code>CSS</code> interface, and the <code title=''>supports()</code> function</h3>
    1.21  
    1.22 -<pre class='idl'>partial interface Window {
    1.23 -  boolean supportsCSS (DOMString property, DOMString value);
    1.24 -};</pre>
    1.25 +<p>The <dfn id='CSS-interface'><code>CSS</code></dfn> interface holds useful CSS-related functions that do not belong elsewhere.
    1.26  
    1.27 -<p>The <code>supportsCSS</code> function must return <code>true</code>
    1.28 -if the implementation <i>supports</i> the value given by <var>value</var> for 
    1.29 -the property given by <var>property</var>, and <code>false</code> otherwise.
    1.30 +<pre class='idl'>interface CSS {
    1.31 +  boolean supports(DOMString property, DOMString value);
    1.32 +  boolean supports(DOMString declaration);
    1.33 +}</pre>
    1.34 +
    1.35 +<dl class='idl-methods'>
    1.36 +  <dt><code>supports(DOMString property, DOMString value)</code>,
    1.37 +    returns <code>boolean</code>
    1.38 +  <dt><code>supports(DOMString declaration)</code>,
    1.39 +    returns <code>boolean</code>
    1.40 +  <dd>
    1.41 +    When the <code title=''>supports()</code> method is invoked with two arguments <var>property</var> and <var>value</var>,
    1.42 +    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,
    1.43 +    and <var>value</var> would be successfully parsed as a supported value for that property.
    1.44 +    Otherwise, it must return <code>false</code>.
    1.45 +
    1.46 +    <p>
    1.47 +      When invoked with a single <var>declaration</var> argument,
    1.48 +      it must return <code>true</code> if <var>declaration</var>,
    1.49 +      when parsed as a declaration,
    1.50 +      represents a valid declaration for a property that the UA supports.
    1.51 +      Otherwise, it must return <code>false</code>.
    1.52 +  </dl>
    1.53 +
    1.54  
    1.55  <h2 id="conformance">Conformance</h2>
    1.56  

mercurial