[css-variables] Write the API section.

Fri, 31 Aug 2012 16:57:00 -0700

author
Tab Atkins Jr. <jackalmage@gmail.com>
date
Fri, 31 Aug 2012 16:57:00 -0700
changeset 6639
e423296a0bb6
parent 6638
af9d63a33555
child 6640
c96666f9dba4

[css-variables] Write the API section.

css-variables/Overview.html file | annotate | diff | comparison | revisions
css-variables/Overview.src.html file | annotate | diff | comparison | revisions
     1.1 --- a/css-variables/Overview.html	Fri Aug 31 16:39:13 2012 -0700
     1.2 +++ b/css-variables/Overview.html	Fri Aug 31 16:57:00 2012 -0700
     1.3 @@ -1,48 +1,50 @@
     1.4  <!DOCTYPE html>
     1.5  
     1.6  <html lang=en>
     1.7 - <head><meta content="text/html; charset=utf-8" http-equiv=Content-Type>
     1.8 + <head profile="http://dublincore.org/documents/2008/08/04/dc-html/ ">
     1.9 +  <meta content="text/html; charset=utf-8" http-equiv=Content-Type>
    1.10 +  <title>CSS Cascading Variables Module Level 1</title>
    1.11  
    1.12 -  <title>CSS Variables Module Level 1</title>
    1.13 +  <link href="http://purl.org/dc/terms/" rel=schema.DC>
    1.14 +  <meta content="CSS Cascading Variables Module Level 1" name=DC.title>
    1.15 +  <meta content=text name=DC.type>
    1.16 +  <meta content=2012-08-31 name=DC.issued>
    1.17 +  <meta content="http://dev.w3.org/csswg/css-variables/" name=DC.creator>
    1.18 +  <meta content=W3C name=DC.publisher>
    1.19 +  <meta content="http://www.w3.org/TR/2012/ED-css-variables-20120831/"
    1.20 +   name=DC.identifier>
    1.21 +  <link href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
    1.22 +   rel=DC.rights>
    1.23    <link href="http://dev.w3.org/csswg/default.css" rel=stylesheet
    1.24 -  type="text/css">
    1.25 +   type="text/css">
    1.26    <link href="http://www.w3.org/StyleSheets/TR/W3C-ED.css" rel=stylesheet
    1.27 -  type="text/css">
    1.28 -
    1.29 -  <style>
    1.30 -		pre.idl { border:solid thin; background:#eee; color:#000; padding:0.5em }
    1.31 -		pre.idl :link, pre.idl :visited { color:inherit; background:transparent }
    1.32 -		i { font-style: normal; }
    1.33 -	</style>
    1.34 +   type="text/css">
    1.35  
    1.36   <body>
    1.37    <div class=head> <!--begin-logo-->
    1.38     <p><a href="http://www.w3.org/"><img alt=W3C height=48
    1.39      src="http://www.w3.org/Icons/w3c_home" width=72></a> <!--end-logo-->
    1.40  
    1.41 -   <h1>CSS Variables Module Level 1</h1>
    1.42 +   <h1>CSS Cascading Variables Module Level 1</h1>
    1.43  
    1.44 -   <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 24 August 2012</h2>
    1.45 +   <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 31 August 2012</h2>
    1.46  
    1.47     <dl>
    1.48      <dt>This version:
    1.49 -     <!--<dd><a href="http://www.w3.org/TR/2012/WD-css-variables-20120824/">http://www.w3.org/TR/2012/ED-css-variables-20120824/</a>-->
    1.50 -     
    1.51 +     <!--<dd><a href="http://www.w3.org/TR/2012/WD-css-variables-20120831/">http://www.w3.org/TR/2012/ED-css-variables-20120831/</a>-->
    1.52  
    1.53      <dd><a href="http://dev.w3.org/csswg/css-variables/">Editor's draft</a>
    1.54 -     (version of 24 August 2012)
    1.55 +     (version of 31 August 2012)
    1.56  
    1.57      <dt>Latest version:
    1.58  
    1.59      <dd><a
    1.60       href="http://www.w3.org/TR/css-variables/">http://www.w3.org/TR/css-variables/</a>
    1.61 -     
    1.62  
    1.63      <dt>Editor's draft:
    1.64  
    1.65      <dd><a
    1.66       href="http://dev.w3.org/csswg/css-variables/">http://dev.w3.org/csswg/css-variables/</a>
    1.67 -     
    1.68  
    1.69      <dt>Editors:
    1.70  
    1.71 @@ -52,7 +54,6 @@
    1.72  
    1.73      <dd class=vcard> <a class=url href="http://xanthir.com/contact/"> <span
    1.74       class=fn>Tab Atkins Jr.</span>, </a> <span class=org>Google, Inc.</span>
    1.75 -     
    1.76  
    1.77      <dd class=vcard> <span class=fn>Daniel Glazman</span>, <span
    1.78       class=org>Disruptive Innovations</span>, <span
    1.79 @@ -80,14 +81,11 @@
    1.80  
    1.81    <h2 class="no-num no-toc" id=abstract>Abstract</h2>
    1.82  
    1.83 -  <p>CSS is a language for describing the rendering of structured documents
    1.84 -   (such as HTML and XML) on screen, on paper, in speech, etc. This module
    1.85 -   contains the features of CSS level 3 relating to variables. It includes
    1.86 -   and extends the functionality of CSS level 2 <a href="#CSS21"
    1.87 -   rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>, which builds on CSS level 1
    1.88 -   <a href="#CSS1" rel=biblioentry>[CSS1]<!--{{CSS1}}--></a>. The main
    1.89 -   extensions compared to level 2 are the introduction of the variable as a
    1.90 -   new primitive value type that is accepted by all properties.
    1.91 +  <p> This module introduces cascading variables as a new primitive value
    1.92 +   type that is accepted by all CSS properties. <a
    1.93 +   href="http://www.w3.org/TR/CSS/">CSS</a> is a language for describing the
    1.94 +   rendering of structured documents (such as HTML and XML) on screen, on
    1.95 +   paper, in speech, etc.
    1.96  
    1.97    <h2 class="no-num no-toc" id=status>Status of this document</h2>
    1.98    <!--begin-status-->
    1.99 @@ -141,13 +139,22 @@
   1.100      properties</a>
   1.101  
   1.102     <li><a href="#using-variables"><span class=secno>3. </span> Using
   1.103 -    Variables - the ‘<code class=css>var()</code>’ notation</a>
   1.104 +    Cascading Variables: the ‘<code class=css>var()</code>’ notation</a>
   1.105      <ul class=toc>
   1.106 -     <li><a href="#using-invalid-variables"><span class=secno>3.1. </span>
   1.107 -      Using Invalid Variables</a>
   1.108 +     <li><a href="#invalid-variables"><span class=secno>3.1. </span> Invalid
   1.109 +      Variables</a>
   1.110      </ul>
   1.111  
   1.112 -   <li><a href="#cssom"><span class=secno>4. </span> CSSOM</a>
   1.113 +   <li><a href="#cssom"><span class=secno>4. </span> APIs</a>
   1.114 +    <ul class=toc>
   1.115 +     <li><a href="#the-cssstyledeclaration-interface"><span class=secno>4.1.
   1.116 +      </span> Extensions to the <code>CSSStyleDeclaration</code>
   1.117 +      Interface</a>
   1.118 +
   1.119 +     <li><a href="#the-cssvariablesdeclaration-interface"><span
   1.120 +      class=secno>4.2. </span> The <code>CSSVariablesDeclaration</code>
   1.121 +      Interface</a>
   1.122 +    </ul>
   1.123  
   1.124     <li><a href="#conformance"><span class=secno>5. </span> Conformance</a>
   1.125      <ul class=toc>
   1.126 @@ -201,10 +208,10 @@
   1.127     known collectively as <a href="#custom-property"><i>custom
   1.128     properties</i></a>, which allow an author to assign arbitrary values to a
   1.129     property with an author-chosen name, and <a
   1.130 -   href="#variable"><i>variables</i></a>, which allow an author to then use
   1.131 -   those values in other properties elsewhere in the document. This makes it
   1.132 -   easier to read large files, as seemingly-arbitrary values now have
   1.133 -   informative names, and makes editing such files much easier and less
   1.134 +   href="#cascading-variable"><i>variables</i></a>, which allow an author to
   1.135 +   then use those values in other properties elsewhere in the document. This
   1.136 +   makes it easier to read large files, as seemingly-arbitrary values now
   1.137 +   have informative names, and makes editing such files much easier and less
   1.138     error-prone, as one only has to change the value once, in the <a
   1.139     href="#custom-property"><i>custom property</i></a>, and the change will
   1.140     propagate to all uses of that variable automatically.
   1.141 @@ -212,8 +219,8 @@
   1.142    <h3 id=placement><span class=secno>1.1. </span> Module Interactions</h3>
   1.143  
   1.144    <p> This module defines a new type of primitive value, the <a
   1.145 -   href="#variable"><i>variable</i></a>, which is accepted by all properties.
   1.146 -   
   1.147 +   href="#cascading-variable"><i>variable</i></a>, which is accepted by all
   1.148 +   properties.
   1.149  
   1.150    <h3 id=values><span class=secno>1.2. </span> Values</h3>
   1.151  
   1.152 @@ -234,7 +241,7 @@
   1.153  
   1.154    <p> This specification defines an open-ended set of properties called <a
   1.155     href="#custom-property"><i>custom properties</i></a>, which are used to
   1.156 -   define <a href="#variable"><i>variables</i></a>.
   1.157 +   define <a href="#cascading-variable"><i>variables</i></a>.
   1.158  
   1.159    <table class=propdef>
   1.160     <tbody>
   1.161 @@ -284,6 +291,12 @@
   1.162     authors and users; CSS will never give them a meaning beyond what is
   1.163     presented here.
   1.164  
   1.165 +  <p class=issue> How is casing handled in property names? Are ‘<code
   1.166 +   class=property>var-foo</code>’ and ‘<code
   1.167 +   class=property>var-Foo</code>’ the same or different properties? (I
   1.168 +   think we need at least ASCII lowercasing, to match current CSS-defined
   1.169 +   properties.)
   1.170 +
   1.171    <p> <a href="#custom-property"><i>Custom properties</i></a> have an
   1.172     extremely permissive value grammar, defined as the "value" production in
   1.173     <a href="http://www.w3.org/TR/CSS2/syndata.html#tokenization">CSS 2.1
   1.174 @@ -294,10 +307,6 @@
   1.175     brackets, or any character that would normally end a declaration (a
   1.176     top-level semicolon or close brace).
   1.177  
   1.178 -  <p class=issue> This should be defined as "any sequence of tokens that can
   1.179 -   be parsed, starting from the ‘<code class=css>declarative-value
   1.180 -   mode</code>’ in Syntax, without switching out of that mode".
   1.181 -
   1.182    <p class=note> Note: Custom properties can contain a trailing ‘<code
   1.183     class=css>!important</code>’, but this is automatically removed from the
   1.184     property's value by the CSS parser, and makes the custom property
   1.185 @@ -311,19 +320,20 @@
   1.186     defines an <a href="#invalid-variable"><i>invalid variable</i></a>.
   1.187  
   1.188    <p> The primary purpose of <a href="#custom-property"><i>custom
   1.189 -   properties</i></a> is to define <a href="#variable"><i>variables</i></a>.
   1.190 -   In CSS, a <dfn id=variable>variable</dfn> is a value that can be
   1.191 -   substituted into other properties, allowing authors to "abstract" parts of
   1.192 -   their page's CSS out. Every <a href="#custom-property"><i>custom
   1.193 -   property</i></a> defines a corresponding <a
   1.194 -   href="#variable"><i>variable</i></a> with the same name, minus the "var-"
   1.195 -   prefix. For example, the custom property ‘<code
   1.196 -   class=property>var-foo</code>’ defines a variable named ‘<code
   1.197 -   class=css>foo</code>’. See the next chapter for details on how to use
   1.198 -   variables.
   1.199 +   properties</i></a> is to define <a href="#cascading-variable"><i>cascading
   1.200 +   variables</i></a>. In CSS, a <dfn id=cascading-variable
   1.201 +   title="variable|cascading variable">cascading variable</dfn> is a value
   1.202 +   that can be substituted into other properties, allowing authors to
   1.203 +   "abstract" parts of their page's CSS out and reuse it in several places.
   1.204 +   Every <a href="#custom-property"><i>custom property</i></a> defines a
   1.205 +   corresponding <a href="#cascading-variable"><i>variable</i></a> with the
   1.206 +   same name, minus the "var-" prefix. For example, the custom property
   1.207 +   ‘<code class=property>var-foo</code>’ defines a variable named
   1.208 +   ‘<code class=css>foo</code>’. See the next chapter for details on how
   1.209 +   to use variables.
   1.210  
   1.211 -  <p> <a href="#custom-property"><i>Custom properties</i></a> can be put to
   1.212 -   several other uses, of course. For example, they can be used to
   1.213 +  <p class=note> <a href="#custom-property"><i>Custom properties</i></a> can
   1.214 +   be put to several other uses, of course. For example, they can be used to
   1.215     conveniently attach values to elements so that JavaScript can later use
   1.216     those values. Another example is providing "custom CSS" by treating "var-"
   1.217     as a kind of "author prefix" (similar to a vendor prefix) that allows an
   1.218 @@ -437,13 +447,13 @@
   1.219    </div>
   1.220  
   1.221    <p> It is important to note that <a href="#custom-property"><i>custom
   1.222 -   properties</i></a> resolve any <a href="#variable"><i>variables</i></a> in
   1.223 -   their values at computed-value time, which occurs <em>before</em> the
   1.224 -   value is inherited. In general, cyclic dependencies occur only when
   1.225 -   multiple custom properties on the same element refer to each other; custom
   1.226 -   properties defined on elements higher in the element tree can never cause
   1.227 -   a cyclic reference with properties defined on elements lower in the
   1.228 -   element tree.
   1.229 +   properties</i></a> resolve any <a
   1.230 +   href="#cascading-variable"><i>variables</i></a> in their values at
   1.231 +   computed-value time, which occurs <em>before</em> the value is inherited.
   1.232 +   In general, cyclic dependencies occur only when multiple custom properties
   1.233 +   on the same element refer to each other; custom properties defined on
   1.234 +   elements higher in the element tree can never cause a cyclic reference
   1.235 +   with properties defined on elements lower in the element tree.
   1.236  
   1.237    <div class=example>
   1.238     <p> For example, given the following structure, these custom properties
   1.239 @@ -501,24 +511,34 @@
   1.240                                                                       gggggg  
   1.241  -->
   1.242  
   1.243 -  <h2 id=using-variables><span class=secno>3. </span> Using Variables - the
   1.244 -   ‘<code class=css>var()</code>’ notation</h2>
   1.245 +  <h2 id=using-variables><span class=secno>3. </span> Using Cascading
   1.246 +   Variables: the ‘<code class=css>var()</code>’ notation</h2>
   1.247  
   1.248    <p> Every <a href="#custom-property"><i>custom property</i></a>
   1.249     automatically defines a corresponding <a
   1.250 -   href="#variable"><i>variable</i></a>, which can then be substituted into
   1.251 -   another property with the ‘<code class=css>var()</code>’ function. The
   1.252 -   syntax of ‘<code class=css>var()</code>’ is:
   1.253 +   href="#cascading-variable"><i>cascading variable</i></a>, which can then
   1.254 +   be substituted into another property with the ‘<code
   1.255 +   class=css>var()</code>’ function. The syntax of ‘<code
   1.256 +   class=css>var()</code>’ is:
   1.257  
   1.258    <pre><dfn
   1.259 -   id=default-var-type>&lt;variable></dfn> = var( <var>variable-name</var> [, <var>&lt;value></var> ]? )</pre>
   1.260 +   id=default-var-type>&lt;variable></dfn> = var( <var>variable-name</var> [, <var>&lt;fallback></var> ]? )</pre>
   1.261  
   1.262    <p> A variable can be used in place of any component value in any property
   1.263     on an element. Variables can not be used as property names, selectors, or
   1.264 -   anything else besides property values - doing so either produces an
   1.265 -   invalid value or, in some situations like the attribute value of an
   1.266 -   attribute selector, produces a valid value that nonetheless has no
   1.267 -   relation to the variable of that name.
   1.268 +   anything else besides property values. (Doing so usually produces invalid
   1.269 +   syntax, or else a value whose meaning has no connection to the variable.)
   1.270 +
   1.271 +  <p> The <var>&lt;fallback></var> value is identical to the syntax of a <a
   1.272 +   href="#custom-property"><i>custom property</i></a>, except that unmatched
   1.273 +   ) tokens cannot appear at the top-level. (They will be interpreted as
   1.274 +   closing the function.)
   1.275 +
   1.276 +  <p> If the variable named by the first argument is valid, the variable's
   1.277 +   value is substituted as normal. If it's invalid, and a
   1.278 +   <var>&lt;fallback></var> was provided, the <var>&lt;fallback></var> is
   1.279 +   substituted instead. Otherwise, the variable is an <a
   1.280 +   href="#invalid-variable"><i>invalid variable</i></a>.
   1.281  
   1.282    <div class=example>
   1.283     <p> For example, the following code incorrectly attempts to use a variable
   1.284 @@ -536,7 +556,6 @@
   1.285     <p> This is <em>not</em> equivalent to setting ‘<code
   1.286      class=css>margin-top: 20px;</code>’. Instead, the second declaration is
   1.287      simply thrown away as a syntax error for having an invalid property name.
   1.288 -    
   1.289  
   1.290     <p> Similarly, you can't build up a single component value where part of
   1.291      it is provided by a variable:
   1.292 @@ -603,43 +622,26 @@
   1.293     that the theming stylesheet can just override the variables it cares
   1.294     about, rather than being forced to provide values for all of them.
   1.295  
   1.296 -  <p> The ‘<code class=css>var()</code>’ notation allows a default value
   1.297 -   to be specified when referencing a variable. After the variable name,
   1.298 -   insert a comma and then provide any value, just like the value of a <a
   1.299 -   href="#custom-property"><i>custom property</i></a>.
   1.300 -
   1.301 -  <p class=issue> The syntax for custom properties and var fallbacks are
   1.302 -   actually slightly different - you can't use an unbalanced ) in the
   1.303 -   fallback, since it ends a function, but you *can* use a semicolon or an
   1.304 -   unbalanced }. This should be defined as "any sequence of tokens that can
   1.305 -   be parsed by the ‘<code class=css>consume a function</code>’ algo in
   1.306 -   Syntax without returning the function".
   1.307 -
   1.308 -  <p> If the variable named by the first argument is valid, the variable's
   1.309 -   value is substituted as normal. If it's invalid, and a second argument was
   1.310 -   provided, the value of the second argument is substituted instead.
   1.311 -   Otherwise, the ‘<code class=css>var()</code>’ represents an <a
   1.312 -   href="#invalid-variable"><i>invalid variable</i></a>.
   1.313 -
   1.314 -  <h3 id=using-invalid-variables><span class=secno>3.1. </span> Using Invalid
   1.315 -   Variables</h3>
   1.316 +  <h3 id=invalid-variables><span class=secno>3.1. </span> Invalid Variables</h3>
   1.317  
   1.318    <p> When a <a href="#custom-property"><i>custom property</i></a> has its
   1.319 -   initial value, the <a href="#variable"><i>variable</i></a> it defines
   1.320 -   represents an <dfn id=invalid-variable>invalid variable</dfn>. Using an <a
   1.321 -   href="#invalid-variable"><i>invalid variable</i></a> in a property value
   1.322 -   (including other <a href="#custom-property"><i>custom properties</i></a>)
   1.323 -   makes the declaration <a href="#invalid-at-computed-value-time"><i>invalid
   1.324 -   at computed-value time</i></a>.
   1.325 +   initial value, the <a href="#cascading-variable"><i>variable</i></a> it
   1.326 +   defines represents an <dfn id=invalid-variable>invalid variable</dfn>.
   1.327 +   Using an <a href="#invalid-variable"><i>invalid variable</i></a> in a
   1.328 +   property value (including other <a href="#custom-property"><i>custom
   1.329 +   properties</i></a>) makes the declaration <a
   1.330 +   href="#invalid-at-computed-value-time"><i>invalid at computed-value
   1.331 +   time</i></a>.
   1.332  
   1.333    <p> A declaration can be <dfn id=invalid-at-computed-value-time>invalid at
   1.334     computed-value time</dfn> if it uses an invalid <a
   1.335 -   href="#variable"><i>variable</i></a>, as explained above, or if it uses a
   1.336 -   valid <a href="#variable"><i>variable</i></a>, but the property value,
   1.337 -   after substituting its <a href="#variable"><i>variables</i></a>, is
   1.338 -   invalid. When this happens, the computed value of the property is either
   1.339 -   the property's inherited value or its initial value depending on whether
   1.340 -   the property is inherited or not, respectively.
   1.341 +   href="#cascading-variable"><i>variable</i></a>, as explained above, or if
   1.342 +   it uses a valid <a href="#cascading-variable"><i>variable</i></a>, but the
   1.343 +   property value, after substituting its <a
   1.344 +   href="#cascading-variable"><i>variables</i></a>, is invalid. When this
   1.345 +   happens, the computed value of the property is either the property's
   1.346 +   inherited value or its initial value depending on whether the property is
   1.347 +   inherited or not, respectively.
   1.348  
   1.349    <div class=example>
   1.350     <p> For example, in the following code:
   1.351 @@ -667,21 +669,89 @@
   1.352     computed-value time</i></a> concept exists because variables can't "fail
   1.353     early" like other syntax errors can, so by the time the user agent
   1.354     realizes a property value is invalid, it's already thrown away the other
   1.355 -   cascaded values.
   1.356 +   cascaded values. <!--
   1.357 +               AAA               PPPPPPPPPPPPPPPPP   IIIIIIIIII
   1.358 +              A:::A              P::::::::::::::::P  I::::::::I
   1.359 +             A:::::A             P::::::PPPPPP:::::P I::::::::I
   1.360 +            A:::::::A            PP:::::P     P:::::PII::::::II
   1.361 +           A:::::::::A             P::::P     P:::::P  I::::I  
   1.362 +          A:::::A:::::A            P::::P     P:::::P  I::::I  
   1.363 +         A:::::A A:::::A           P::::PPPPPP:::::P   I::::I  
   1.364 +        A:::::A   A:::::A          P:::::::::::::PP    I::::I  
   1.365 +       A:::::A     A:::::A         P::::PPPPPPPPP      I::::I  
   1.366 +      A:::::AAAAAAAAA:::::A        P::::P              I::::I  
   1.367 +     A:::::::::::::::::::::A       P::::P              I::::I  
   1.368 +    A:::::AAAAAAAAAAAAA:::::A      P::::P              I::::I  
   1.369 +   A:::::A             A:::::A   PP::::::PP          II::::::II
   1.370 +  A:::::A               A:::::A  P::::::::P          I::::::::I
   1.371 + A:::::A                 A:::::A P::::::::P          I::::::::I
   1.372 +AAAAAAA                   AAAAAAAPPPPPPPPPP          IIIIIIIIII
   1.373 +-->
   1.374  
   1.375 -  <h2 id=cssom><span class=secno>4. </span> CSSOM</h2>
   1.376 +  <h2 id=cssom><span class=secno>4. </span> APIs</h2>
   1.377  
   1.378 -  <p> <a href="#custom-property"><i>Custom properties</i></a> are ordinary
   1.379 -   properties, and can be read or modified using all of the existing CSSOM
   1.380 -   APIs for reading or modifying properties.
   1.381 +  <h3 id=the-cssstyledeclaration-interface><span class=secno>4.1. </span>
   1.382 +   Extensions to the <code>CSSStyleDeclaration</code> Interface</h3>
   1.383  
   1.384 -  <p class=issue> Right now, the CSSStyleDeclaration interface can be specced
   1.385 -   and implemented as a normal interface that just has a *ton* of attributes.
   1.386 -   (In practice, we don't spec it this way, because it was difficult to
   1.387 -   extend before partial interfaces were created, but I think it's
   1.388 -   implemented this way.) However, variables mess this up - there's an
   1.389 -   infinite number of them. Ideally we'd only expose the valid ones (those
   1.390 -   set to a non-initial value). How to spec this?
   1.391 +  <p> The <code>CSSStyleDeclaration</code> interface is amended as follows:
   1.392 +
   1.393 +  <pre class=idl>
   1.394 +partial interface CSSStyleDeclaration {
   1.395 +	attribute CSSVariablesDeclaration var;
   1.396 +}</pre>
   1.397 +
   1.398 +  <h3 id=the-cssvariablesdeclaration-interface><span class=secno>4.2. </span>
   1.399 +   The <code>CSSVariablesDeclaration</code> Interface</h3>
   1.400 +
   1.401 +  <p> The <code>CSSVariablesDeclaration</code> interface exposes the <a
   1.402 +   href="#custom-property"><i>custom properties</i></a> declared in the
   1.403 +   block, in a more convenient fashion than the
   1.404 +   <code>getPropertyValue()</code>/etc. functions.
   1.405 +
   1.406 +  <pre class=idl>
   1.407 +interface CSSVariablesDeclaration {
   1.408 +    <a
   1.409 +   href="#cssvariablesdeclaration-getter"><i>getter</i></a> DOMString (DOMString varName);
   1.410 +    <a
   1.411 +   href="#cssvariablesdeclaration-setter"><i>setter</i></a> <a
   1.412 +   href="#cssvariablesdeclaration-creator"><i>creator</i></a> void (DOMString varName, DOMString varValue);
   1.413 +    <a
   1.414 +   href="#cssvariablesdeclaration-deleter"><i>deleter</i></a> void (DOMString varName);
   1.415 +}</pre>
   1.416 +
   1.417 +  <p> The <a
   1.418 +   href="http://dev.w3.org/2006/webapi/WebIDL/#dfn-supported-property-names">supported
   1.419 +   property names</a> on a CSSStyleDeclaration object are the property names
   1.420 +   of all the <a href="#custom-property"><i>custom properties</i></a> in the
   1.421 +   <a
   1.422 +   href="http://dev.w3.org/csswg/cssom/#css-declaration-block-declarations">CSS
   1.423 +   declaration block declarations</a>, with the "var-" prefix removed.
   1.424 +
   1.425 +  <p> Before running any of the algorithms in this section, prepend "var-" to
   1.426 +   <var>varName</var>&apos;s value.
   1.427 +
   1.428 +  <p> When asked to <dfn id=cssvariablesdeclaration-getter title=getter>get
   1.429 +   the value of a variable</dfn>, if <var>varName</var> is in the <i>CSS
   1.430 +   declaration block declarations</i>, invoke <code>getPropertyValue()</code>
   1.431 +   by passing <var>varName</var> as its argument, and return the returned
   1.432 +   value. Otherwise, return the empty string.
   1.433 +
   1.434 +  <p> When asked to <dfn id=cssvariablesdeclaration-setter
   1.435 +   title=setter>set</dfn> or <dfn id=cssvariablesdeclaration-creator
   1.436 +   title=creator>create the value of a variable</dfn>, if <var>varName</var>
   1.437 +   matches the grammar of a <a href="#custom-property"><i>custom
   1.438 +   property</i></a> name: if <var>varValue</var> is the empty string, invoke
   1.439 +   <a href="#cssvariablesdeclaration-deleter"><i title=deleter>the algorithm
   1.440 +   to delete a variable</i></a>; otherwise, invoke <code>setProperty()</code>
   1.441 +   by passing <var>varName</var> as the <var>property</var> argument and
   1.442 +   <var>varValue</var> as the <var>value</var> argument.
   1.443 +
   1.444 +  <p> When asked to <dfn id=cssvariablesdeclaration-deleter
   1.445 +   title=deleter>delete the value of a variable</dfn>, if <var>varName</var>
   1.446 +   matches the grammar of a <a href="#custom-property"><i>custom
   1.447 +   property</i></a> name, invoke <code>removeProperty()</code> by passing
   1.448 +   <var>varName</var> as its argument, and return the returned value.
   1.449 +   Otherwise, do nothing and return the empty string.
   1.450  
   1.451    <h2 id=conformance><span class=secno>5. </span> Conformance</h2>
   1.452  
   1.453 @@ -715,8 +785,8 @@
   1.454    <h3 id=conformance-classes><span class=secno>5.2. </span> Conformance
   1.455     Classes</h3>
   1.456  
   1.457 -  <p>Conformance to CSS Variables Module is defined for three conformance
   1.458 -   classes:
   1.459 +  <p>Conformance to CSS Cascading Variables Module is defined for three
   1.460 +   conformance classes:
   1.461  
   1.462    <dl>
   1.463     <dt><dfn id=style-sheet title="style sheet!!as conformance class">style
   1.464 @@ -737,24 +807,24 @@
   1.465      that writes a style sheet.
   1.466    </dl>
   1.467  
   1.468 -  <p>A style sheet is conformant to CSS Variables Module if all of its
   1.469 -   declarations that use properties defined in this module have values that
   1.470 -   are valid according to the generic CSS grammar and the individual grammars
   1.471 -   of each property as given in this module.
   1.472 +  <p>A style sheet is conformant to CSS Cascading Variables Module if all of
   1.473 +   its declarations that use properties defined in this module have values
   1.474 +   that are valid according to the generic CSS grammar and the individual
   1.475 +   grammars of each property as given in this module.
   1.476  
   1.477 -  <p>A renderer is conformant to CSS Variables Module if, in addition to
   1.478 -   interpreting the style sheet as defined by the appropriate specifications,
   1.479 -   it supports all the features defined by CSS Variables Module by parsing
   1.480 -   them correctly and rendering the document accordingly. However, the
   1.481 -   inability of a UA to correctly render a document due to limitations of the
   1.482 -   device does not make the UA non-conformant. (For example, a UA is not
   1.483 -   required to render color on a monochrome monitor.)
   1.484 +  <p>A renderer is conformant to CSS Cascading Variables Module if, in
   1.485 +   addition to interpreting the style sheet as defined by the appropriate
   1.486 +   specifications, it supports all the features defined by CSS Cascading
   1.487 +   Variables Module by parsing them correctly and rendering the document
   1.488 +   accordingly. However, the inability of a UA to correctly render a document
   1.489 +   due to limitations of the device does not make the UA non-conformant. (For
   1.490 +   example, a UA is not required to render color on a monochrome monitor.)
   1.491  
   1.492 -  <p>An authoring tool is conformant to CSS Variables Module if it writes
   1.493 -   style sheets that are syntactically correct according to the generic CSS
   1.494 -   grammar and the individual grammars of each feature in this module, and
   1.495 -   meet all other conformance requirements of style sheets as described in
   1.496 -   this module.
   1.497 +  <p>An authoring tool is conformant to CSS Cascading Variables Module if it
   1.498 +   writes style sheets that are syntactically correct according to the
   1.499 +   generic CSS grammar and the individual grammars of each feature in this
   1.500 +   module, and meet all other conformance requirements of style sheets as
   1.501 +   described in this module.
   1.502  
   1.503    <h3 id=partial><span class=secno>5.3. </span> Partial Implementations</h3>
   1.504  
   1.505 @@ -878,7 +948,7 @@
   1.506      Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7 June
   1.507      2011. W3C Recommendation. URL: <a
   1.508      href="http://www.w3.org/TR/2011/REC-CSS2-20110607">http://www.w3.org/TR/2011/REC-CSS2-20110607</a>
   1.509 -    </dd>
   1.510 +   </dd>
   1.511     <!---->
   1.512  
   1.513     <dt id=CSS3VAL>[CSS3VAL]
   1.514 @@ -888,7 +958,7 @@
   1.515      Values and Units Module Level 3.</cite></a> 8 March 2012. W3C Working
   1.516      Draft. (Work in progress.) URL: <a
   1.517      href="http://www.w3.org/TR/2012/WD-css3-values-20120308/">http://www.w3.org/TR/2012/WD-css3-values-20120308/</a>
   1.518 -    </dd>
   1.519 +   </dd>
   1.520     <!---->
   1.521  
   1.522     <dt id=RFC2119>[RFC2119]
   1.523 @@ -897,7 +967,7 @@
   1.524      words for use in RFCs to Indicate Requirement Levels.</cite></a> Internet
   1.525      RFC 2119. URL: <a
   1.526      href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
   1.527 -    </dd>
   1.528 +   </dd>
   1.529     <!---->
   1.530    </dl>
   1.531    <!--end-normative-->
   1.532 @@ -910,23 +980,13 @@
   1.533     <dt style="display: none"><!-- keeps the doc valid if the DL is empty -->
   1.534      <!---->
   1.535  
   1.536 -   <dt id=CSS1>[CSS1]
   1.537 -
   1.538 -   <dd>Håkon Wium Lie; Bert Bos. <a
   1.539 -    href="http://www.w3.org/TR/2008/REC-CSS1-20080411"><cite>Cascading Style
   1.540 -    Sheets (CSS1) Level 1 Specification.</cite></a> 11 April 2008. W3C
   1.541 -    Recommendation. URL: <a
   1.542 -    href="http://www.w3.org/TR/2008/REC-CSS1-20080411">http://www.w3.org/TR/2008/REC-CSS1-20080411</a>
   1.543 -    </dd>
   1.544 -   <!---->
   1.545 -
   1.546     <dt id=CSS3COLOR>[CSS3COLOR]
   1.547  
   1.548     <dd>Tantek Çelik; Chris Lilley; L. David Baron. <a
   1.549      href="http://www.w3.org/TR/2011/REC-css3-color-20110607"><cite>CSS Color
   1.550      Module Level 3.</cite></a> 7 June 2011. W3C Recommendation. URL: <a
   1.551      href="http://www.w3.org/TR/2011/REC-css3-color-20110607">http://www.w3.org/TR/2011/REC-css3-color-20110607</a>
   1.552 -    </dd>
   1.553 +   </dd>
   1.554     <!---->
   1.555    </dl>
   1.556    <!--end-informative-->
   1.557 @@ -938,12 +998,24 @@
   1.558     <li>authoring tool, <a href="#authoring-tool"
   1.559      title="authoring tool"><strong>5.2.</strong></a>
   1.560  
   1.561 +   <li>cascading variable, <a href="#cascading-variable"
   1.562 +    title="cascading variable"><strong>2.</strong></a>
   1.563 +
   1.564 +   <li>creator, <a href="#cssvariablesdeclaration-creator"
   1.565 +    title=creator><strong>4.2.</strong></a>
   1.566 +
   1.567     <li>custom properties, <a href="#custom-property"
   1.568      title="custom properties"><strong>2.</strong></a>
   1.569  
   1.570     <li>custom property, <a href="#custom-property"
   1.571      title="custom property"><strong>2.</strong></a>
   1.572  
   1.573 +   <li>deleter, <a href="#cssvariablesdeclaration-deleter"
   1.574 +    title=deleter><strong>4.2.</strong></a>
   1.575 +
   1.576 +   <li>getter, <a href="#cssvariablesdeclaration-getter"
   1.577 +    title=getter><strong>4.2.</strong></a>
   1.578 +
   1.579     <li>invalid at computed-value time, <a
   1.580      href="#invalid-at-computed-value-time"
   1.581      title="invalid at computed-value time"><strong>3.1.</strong></a>
   1.582 @@ -952,7 +1024,9 @@
   1.583      title="invalid variable"><strong>3.1.</strong></a>
   1.584  
   1.585     <li>renderer, <a href="#renderer" title=renderer><strong>5.2.</strong></a>
   1.586 -    
   1.587 +
   1.588 +   <li>setter, <a href="#cssvariablesdeclaration-setter"
   1.589 +    title=setter><strong>4.2.</strong></a>
   1.590  
   1.591     <li>style sheet
   1.592      <ul>
   1.593 @@ -962,7 +1036,8 @@
   1.594  
   1.595     <li>var-*, <a href="#var-" title="var-*"><strong>2.</strong></a>
   1.596  
   1.597 -   <li>variable, <a href="#variable" title=variable><strong>2.</strong></a>
   1.598 +   <li>variable, <a href="#cascading-variable"
   1.599 +    title=variable><strong>2.</strong></a>
   1.600  
   1.601     <li>&lt;variable>, <a href="#default-var-type"
   1.602      title="&lt;variable>"><strong>3.</strong></a>
     2.1 --- a/css-variables/Overview.src.html	Fri Aug 31 16:39:13 2012 -0700
     2.2 +++ b/css-variables/Overview.src.html	Fri Aug 31 16:57:00 2012 -0700
     2.3 @@ -2,20 +2,15 @@
     2.4  <html lang="en">
     2.5  <head>
     2.6  	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     2.7 -	<title>CSS Variables Module Level 1</title>
     2.8 +	<title>CSS Cascading Variables Module Level 1</title>
     2.9  	<link rel="stylesheet" type="text/css" href="http://dev.w3.org/csswg/default.css">
    2.10  	<link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-[STATUS].css">
    2.11 -	<style>
    2.12 -		pre.idl { border:solid thin; background:#eee; color:#000; padding:0.5em }
    2.13 -		pre.idl :link, pre.idl :visited { color:inherit; background:transparent }
    2.14 -		i { font-style: normal; }
    2.15 -	</style>
    2.16  </head>
    2.17  
    2.18  <div class="head">
    2.19  <!--logo-->
    2.20  
    2.21 -<h1>CSS Variables Module Level 1</h1>
    2.22 +<h1>CSS Cascading Variables Module Level 1</h1>
    2.23  
    2.24  <h2 class="no-num no-toc">[LONGSTATUS] [DATE]</h2>
    2.25  
    2.26 @@ -52,7 +47,9 @@
    2.27  
    2.28  <h2 class="no-num no-toc" id="abstract">Abstract</h2>
    2.29  
    2.30 -	<p>CSS is a language for describing the rendering of structured documents (such as HTML and XML) on screen, on paper,  in speech, etc. This module contains the features of CSS level&nbsp;3 relating to variables. It includes and extends the functionality of CSS level&nbsp;2 [[!CSS21]], which builds on CSS level&nbsp;1 [[CSS1]]. The main extensions compared to level&nbsp;2 are the introduction of the variable as a new primitive value type that is accepted by all properties.
    2.31 +	<p>
    2.32 +		This module introduces cascading variables as a new primitive value type that is accepted by all CSS properties.
    2.33 +		<a href="http://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents (such as HTML and XML) on screen, on paper, in speech, etc.
    2.34  
    2.35  <h2 class="no-num no-toc" id="status">Status of this document</h2>
    2.36  
    2.37 @@ -150,6 +147,11 @@
    2.38  		<i>Custom properties</i> are solely for use by authors and users;
    2.39  		CSS will never give them a meaning beyond what is presented here.
    2.40  
    2.41 +	<p class='issue'>
    2.42 +		How is casing handled in property names?  
    2.43 +		Are 'var-foo' and 'var-Foo' the same or different properties?
    2.44 +		(I think we need at least ASCII lowercasing, to match current CSS-defined properties.)
    2.45 +
    2.46  	<p>
    2.47  		<i>Custom properties</i> have an extremely permissive value grammar,
    2.48  		defined as the "value" production in <a href="http://www.w3.org/TR/CSS2/syndata.html#tokenization">CSS 2.1 Chapter 4.1</a> [[!CSS21]].
    2.49 @@ -159,12 +161,6 @@
    2.50  		or any character that would normally end a declaration
    2.51  		(a top-level semicolon or close brace).
    2.52  
    2.53 -	<p class='issue'>
    2.54 -		This should be defined as
    2.55 -		"any sequence of tokens that can be parsed,
    2.56 -		starting from the 'declarative-value mode' in Syntax,
    2.57 -		without switching out of that mode".
    2.58 -
    2.59  	<p class='note'>
    2.60  		Note: Custom properties can contain a trailing ''!important'',
    2.61  		but this is automatically removed from the property's value by the CSS parser,
    2.62 @@ -178,15 +174,16 @@
    2.63  		it defines an <i>invalid variable</i>.
    2.64  
    2.65  	<p>
    2.66 -		The primary purpose of <i>custom properties</i> is to define <i>variables</i>.
    2.67 -		In CSS, a <dfn>variable</dfn> is a value that can be substituted into other properties,
    2.68 -		allowing authors to "abstract" parts of their page's CSS out.
    2.69 +		The primary purpose of <i>custom properties</i> is to define <i>cascading variables</i>.
    2.70 +		In CSS, a <dfn title="variable|cascading variable">cascading variable</dfn> is a value that can be substituted into other properties,
    2.71 +		allowing authors to "abstract" parts of their page's CSS out
    2.72 +		and reuse it in several places.
    2.73  		Every <i>custom property</i> defines a corresponding <i>variable</i>
    2.74  		with the same name, minus the "var-" prefix.
    2.75  		For example, the custom property 'var-foo' defines a variable named ''foo''.
    2.76  		See the next chapter for details on how to use variables.
    2.77  
    2.78 -	<p>
    2.79 +	<p class='note'>
    2.80  		<i>Custom properties</i> can be put to several other uses, of course.
    2.81  		For example, they can be used to conveniently attach values to elements
    2.82  		so that JavaScript can later use those values.
    2.83 @@ -352,24 +349,35 @@
    2.84  
    2.85  
    2.86  <h2 id='using-variables'>
    2.87 -Using Variables - the ''var()'' notation</h2>
    2.88 +Using Cascading Variables: the ''var()'' notation</h2>
    2.89  
    2.90  	<p>
    2.91 -		Every <i>custom property</i> automatically defines a corresponding <i>variable</i>,
    2.92 +		Every <i>custom property</i> automatically defines a corresponding <i>cascading variable</i>,
    2.93  		which can then be substituted into another property with the ''var()'' function.
    2.94  		The syntax of ''var()'' is:
    2.95  
    2.96 -	<pre><dfn id='default-var-type'>&lt;variable></dfn> = var( <var>variable-name</var> [, <var>&lt;value></var> ]? )</pre>
    2.97 +	<pre><dfn id='default-var-type'>&lt;variable></dfn> = var( <var>variable-name</var> [, <var>&lt;fallback></var> ]? )</pre>
    2.98  
    2.99  	<p>
   2.100  		A variable can be used in place of any component value in any property on an element.
   2.101  		Variables can not be used as 
   2.102  		property names, 
   2.103  		selectors, 
   2.104 -		or anything else besides property values - 
   2.105 -		doing so either produces an invalid value or, 
   2.106 -		in some situations like the attribute value of an attribute selector, 
   2.107 -		produces a valid value that nonetheless has no relation to the variable of that name.
   2.108 +		or anything else besides property values.
   2.109 +		(Doing so usually produces invalid syntax,
   2.110 +		or else a value whose meaning has no connection to the variable.)
   2.111 +
   2.112 +	<p>
   2.113 +		The <var>&lt;fallback></var> value is identical to the syntax of a <i>custom property</i>,
   2.114 +		except that unmatched ) tokens cannot appear at the top-level.
   2.115 +		(They will be interpreted as closing the function.)
   2.116 +	
   2.117 +	<p>
   2.118 +		If the variable named by the first argument is valid,
   2.119 +		the variable's value is substituted as normal.
   2.120 +		If it's invalid, and a <var>&lt;fallback></var> was provided,
   2.121 +		the <var>&lt;fallback></var> is substituted instead.
   2.122 +		Otherwise, the variable is an <i>invalid variable</i>.
   2.123  
   2.124  	<div class='example'>
   2.125  		<p>
   2.126 @@ -450,29 +458,10 @@
   2.127  		so that the theming stylesheet can just override the variables it cares about,
   2.128  		rather than being forced to provide values for all of them.
   2.129  
   2.130 -	<p>
   2.131 -		The ''var()'' notation allows a default value to be specified when referencing a variable.
   2.132 -		After the variable name, 
   2.133 -		insert a comma
   2.134 -		and then provide any value,
   2.135 -		just like the value of a <i>custom property</i>.
   2.136  
   2.137 -	<p class='issue'>
   2.138 -		The syntax for custom properties and var fallbacks are actually slightly different -
   2.139 -		you can't use an unbalanced ) in the fallback, since it ends a function,
   2.140 -		but you *can* use a semicolon or an unbalanced }.
   2.141 -		This should be defined as "any sequence of tokens that can be parsed by the 'consume a function' algo in Syntax without returning the function".
   2.142  
   2.143 -	<p>
   2.144 -		If the variable named by the first argument is valid,
   2.145 -		the variable's value is substituted as normal.
   2.146 -		If it's invalid, and a second argument was provided,
   2.147 -		the value of the second argument is substituted instead.
   2.148 -		Otherwise, the ''var()'' represents an <i>invalid variable</i>.
   2.149 -
   2.150 -
   2.151 -<h3 id='using-invalid-variables'>
   2.152 -Using Invalid Variables</h3>
   2.153 +<h3 id='invalid-variables'>
   2.154 +Invalid Variables</h3>
   2.155  
   2.156  	<p>
   2.157  		When a <i>custom property</i> has its initial value, 
   2.158 @@ -524,19 +513,84 @@
   2.159  		so by the time the user agent realizes a property value is invalid, 
   2.160  		it's already thrown away the other cascaded values.
   2.161  
   2.162 +<!--
   2.163 +               AAA               PPPPPPPPPPPPPPPPP   IIIIIIIIII
   2.164 +              A:::A              P::::::::::::::::P  I::::::::I
   2.165 +             A:::::A             P::::::PPPPPP:::::P I::::::::I
   2.166 +            A:::::::A            PP:::::P     P:::::PII::::::II
   2.167 +           A:::::::::A             P::::P     P:::::P  I::::I  
   2.168 +          A:::::A:::::A            P::::P     P:::::P  I::::I  
   2.169 +         A:::::A A:::::A           P::::PPPPPP:::::P   I::::I  
   2.170 +        A:::::A   A:::::A          P:::::::::::::PP    I::::I  
   2.171 +       A:::::A     A:::::A         P::::PPPPPPPPP      I::::I  
   2.172 +      A:::::AAAAAAAAA:::::A        P::::P              I::::I  
   2.173 +     A:::::::::::::::::::::A       P::::P              I::::I  
   2.174 +    A:::::AAAAAAAAAAAAA:::::A      P::::P              I::::I  
   2.175 +   A:::::A             A:::::A   PP::::::PP          II::::::II
   2.176 +  A:::::A               A:::::A  P::::::::P          I::::::::I
   2.177 + A:::::A                 A:::::A P::::::::P          I::::::::I
   2.178 +AAAAAAA                   AAAAAAAPPPPPPPPPP          IIIIIIIIII
   2.179 +-->
   2.180 +
   2.181  <h2 id='cssom'>
   2.182 -CSSOM</h2>
   2.183 +APIs</h2>
   2.184 +
   2.185 +<h3 id='the-cssstyledeclaration-interface'>
   2.186 +Extensions to the <code>CSSStyleDeclaration</code> Interface</h3>
   2.187  
   2.188  	<p>
   2.189 -		<i>Custom properties</i> are ordinary properties, 
   2.190 -		and can be read or modified using all of the existing CSSOM APIs for reading or modifying properties.
   2.191 +		The <code>CSSStyleDeclaration</code> interface is amended as follows:
   2.192  
   2.193 -	<p class='issue'>
   2.194 -		Right now, the CSSStyleDeclaration interface can be specced and implemented as a normal interface that just has a *ton* of attributes.
   2.195 -		(In practice, we don't spec it this way, because it was difficult to extend before partial interfaces were created, but I think it's implemented this way.)
   2.196 -		However, variables mess this up - there's an infinite number of them.
   2.197 -		Ideally we'd only expose the valid ones (those set to a non-initial value).
   2.198 -		How to spec this?
   2.199 +	<pre class='idl'>
   2.200 +partial interface CSSStyleDeclaration {
   2.201 +	attribute CSSVariablesDeclaration var;
   2.202 +}</pre>
   2.203 +
   2.204 +<h3 id='the-cssvariablesdeclaration-interface'>
   2.205 +The <code>CSSVariablesDeclaration</code> Interface</h3>
   2.206 +
   2.207 +	<p>
   2.208 +		The <code>CSSVariablesDeclaration</code> interface exposes the <i>custom properties</i> declared in the block,
   2.209 +		in a more convenient fashion than the <code>getPropertyValue()</code>/etc. functions.
   2.210 +
   2.211 +	<pre class='idl'>
   2.212 +interface CSSVariablesDeclaration {
   2.213 +    <i>getter</i> DOMString (DOMString varName);
   2.214 +    <i>setter</i> <i>creator</i> void (DOMString varName, DOMString varValue);
   2.215 +    <i>deleter</i> void (DOMString varName);
   2.216 +}</pre>
   2.217 +
   2.218 +	<p>
   2.219 +		The <a href="http://dev.w3.org/2006/webapi/WebIDL/#dfn-supported-property-names">supported property names</a>
   2.220 +		on a CSSStyleDeclaration object
   2.221 +		are the property names of all the <i>custom properties</i> in the <a href="http://dev.w3.org/csswg/cssom/#css-declaration-block-declarations">CSS declaration block declarations</a>,
   2.222 +		with the "var-" prefix removed.
   2.223 +
   2.224 +	<p>
   2.225 +		Before running any of the algorithms in this section,
   2.226 +		prepend "var-" to <var>varName</var>&apos;s value.
   2.227 +
   2.228 +	<p>
   2.229 +		When asked to <dfn id='cssvariablesdeclaration-getter' title='getter'>get the value of a variable</dfn>,
   2.230 +		if <var>varName</var> is in the <i>CSS declaration block declarations</i>,
   2.231 +		invoke <code>getPropertyValue()</code> by passing <var>varName</var> as its argument,
   2.232 +		and return the returned value.
   2.233 +		Otherwise, return the empty string.
   2.234 +
   2.235 +	<p>
   2.236 +		When asked to <dfn id='cssvariablesdeclaration-setter' title='setter'>set</dfn> or <dfn id='cssvariablesdeclaration-creator' title='creator'>create the value of a variable</dfn>,
   2.237 +		if <var>varName</var> matches the grammar of a <i>custom property</i> name:
   2.238 +		if <var>varValue</var> is the empty string,
   2.239 +		invoke <i title='deleter'>the algorithm to delete a variable</i>;
   2.240 +		otherwise, invoke <code>setProperty()</code> by passing <var>varName</var> as the <var>property</var> argument and <var>varValue</var> as the <var>value</var> argument.
   2.241 +
   2.242 +	<p>
   2.243 +		When asked to <dfn id='cssvariablesdeclaration-deleter' title='deleter'>delete the value of a variable</dfn>,
   2.244 +		if <var>varName</var> matches the grammar of a <i>custom property</i> name,
   2.245 +		invoke <code>removeProperty()</code> by passing <var>varName</var> as its argument,
   2.246 +		and return the returned value.
   2.247 +		Otherwise, do nothing and return the empty string.
   2.248 +
   2.249  
   2.250  <h2 id="conformance">
   2.251  Conformance</h2>
   2.252 @@ -571,7 +625,7 @@
   2.253  <h3 id="conformance-classes">
   2.254  Conformance Classes</h3>
   2.255  
   2.256 -	<p>Conformance to CSS Variables Module
   2.257 +	<p>Conformance to CSS Cascading Variables Module
   2.258  	is defined for three conformance classes:
   2.259  	<dl>
   2.260  		<dt><dfn title="style sheet!!as conformance class">style sheet</dfn>
   2.261 @@ -586,21 +640,21 @@
   2.262  			that writes a style sheet.
   2.263  	</dl>
   2.264  	
   2.265 -	<p>A style sheet is conformant to CSS Variables Module
   2.266 +	<p>A style sheet is conformant to CSS Cascading Variables Module
   2.267  	if all of its declarations that use properties defined in this module
   2.268  	have values that are valid according to the generic CSS grammar and the
   2.269  	individual grammars of each property as given in this module.
   2.270  	
   2.271 -	<p>A renderer is conformant to CSS Variables Module
   2.272 +	<p>A renderer is conformant to CSS Cascading Variables Module
   2.273  	if, in addition to interpreting the style sheet as defined by the
   2.274  	appropriate specifications, it supports all the features defined
   2.275 -	by CSS Variables Module by parsing them correctly
   2.276 +	by CSS Cascading Variables Module by parsing them correctly
   2.277  	and rendering the document accordingly. However, the inability of a
   2.278  	UA to correctly render a document due to limitations of the device
   2.279  	does not make the UA non-conformant. (For example, a UA is not
   2.280  	required to render color on a monochrome monitor.)
   2.281  	
   2.282 -	<p>An authoring tool is conformant to CSS Variables Module
   2.283 +	<p>An authoring tool is conformant to CSS Cascading Variables Module
   2.284  	if it writes style sheets that are syntactically correct according to the
   2.285  	generic CSS grammar and the individual grammars of each feature in
   2.286  	this module, and meet all other conformance requirements of style sheets

mercurial