css-style-attr/Overview.src.html

changeset 9380
b7f4434af876
parent 9379
3ebe8c1e42cf
child 9523
0a8736fbb81c
     1.1 --- a/css-style-attr/Overview.src.html	Fri Oct 11 01:19:13 2013 +0100
     1.2 +++ b/css-style-attr/Overview.src.html	Fri Oct 11 01:20:50 2013 +0100
     1.3 @@ -211,8 +211,14 @@
     1.4  
     1.5  <pre>
     1.6  declaration-list
     1.7 -  : S* declaration? [ ';' S* declaration? ]*
     1.8 +  : S* declaration-list-next
     1.9    ;
    1.10 +
    1.11 +declaration-list-next
    1.12 +    : declaration [ ';' S* declaration-list-next ]?
    1.13 +    | at-rule declaration-list-next
    1.14 +    | /* empty */
    1.15 +    ;
    1.16  </pre>
    1.17  
    1.18  <p class="note">Note that following the CSS2.1 convention, comment tokens
    1.19 @@ -220,15 +226,28 @@
    1.20  
    1.21  <p>The interpreter must parse the style attribute's value using the
    1.22  same forward-compatible parsing rules that apply to parsing declaration block
    1.23 -contents in a normal CSS style sheet. See
    1.24 +contents in a normal CSS style sheet (see
    1.25  <a href="http://www.w3.org/TR/CSS21/syndata.html">chapter 4 of the CSS2.1
    1.26 -specification</a> for details. [[!CSS21]]
    1.27 +specification</a> [[!CSS21]]),
    1.28 +with the following addition: when the UA expects the start of a declaration or at-rule
    1.29 +(i.e., an IDENT token or an ATKEYWORD token) but finds an unexpected token instead,
    1.30 +that token is considered to be the first token of a malformed declaration.
    1.31 +I.e., the rule for malformed declarations, rather than malformed statements,
    1.32 +is used to determine which tokens to ignore in that case.
    1.33  
    1.34  <p class="note">Note that because there is no open brace delimiting the
    1.35  declaration list in the CSS style attribute syntax, a close brace
    1.36  (<code>}</code>) in the style attribute's value does not terminate the
    1.37  style data: it is merely an invalid token.</p>
    1.38  
    1.39 +<div class="note">
    1.40 +<p>Although the grammar allows it,
    1.41 +no at-rule valid in style attributes is define at the moment.
    1.42 +The forward-compatible parsing rules are such that a declaration following an at-rule
    1.43 +is not ignored:
    1.44 +<pre>&lt;span style="@unsupported { splines: reticulating } color: green"></pre>
    1.45 +</div>
    1.46 +
    1.47  <h2 id="interpret">Cascading and Interpretation</h2>
    1.48  
    1.49  <p>The declarations in a style attribute apply to the element to which
    1.50 @@ -250,6 +269,14 @@
    1.51  independently and treated as a separate style rule, the ordering of which
    1.52  should be defined by the document language, else is undefined.
    1.53  
    1.54 +<h2 id="changes">Changes</h2>
    1.55 +
    1.56 +Changes since the <a href="http://www.w3.org/TR/2013/PR-css-style-attr-20131003/">2013-10-03 Proposed Recommendation</a> are:
    1.57 +
    1.58 +<ul>
    1.59 +  <li>Parse at-rules in declaration lists to allow future extension.
    1.60 +</ul>
    1.61 +
    1.62  <h2 id="ack">Acknowledgments</h2>
    1.63  
    1.64  <p>Thanks to feedback from <span class="vcard"><span class="fn">Daniel Glazman</span></span>, <span class="vcard"><span class="fn">Ian Hickson</span></span>, <span class="vcard"><span class="fn n"><span class="given-name">Eric</span> <abbr class="additional-name">A.</abbr> <span class="family-name">Meyer</span></span></span>,

mercurial