Fri, 01 Nov 2013 11:17:56 -0700
[css-syntax] Wording tweaks.
css-syntax/Overview.html | file | annotate | diff | comparison | revisions | |
css-syntax/Overview.src.html | file | annotate | diff | comparison | revisions |
1.1 --- a/css-syntax/Overview.html Fri Nov 01 10:57:08 2013 -0700 1.2 +++ b/css-syntax/Overview.html Fri Nov 01 11:17:56 2013 -0700 1.3 @@ -4465,42 +4465,43 @@ 1.4 In particular, the serialization of comments an whitespace is not defined. 1.5 1.6 <p> The only requirement for serialization is that it must "round-trip" with parsing, 1.7 - ie. parsing again the serialized output must result in identical tokens or other structures, 1.8 - except for consecutive <a class="production css-code" data-link-type=type href=#typedef-whitespace-token title="<whitespace-token>"><whitespace-token></a>s 1.9 - that may be collapsed into a single token. 1.10 + that is, parsing the stylesheet must produce the same data structures as 1.11 + parsing, serializing, and parsing again, 1.12 + except for consecutive <a class="production css-code" data-link-type=type href=#typedef-whitespace-token title="<whitespace-token>"><whitespace-token></a>s, 1.13 + which may be collapsed into a single token. 1.14 1.15 <p class=note> Note: This exception can exist because 1.16 CSS grammars always interpret any amount of whitespace as identical to a single space. 1.17 1.18 - <div class=note id=serialization-tables><style scoped> 1.19 - #serialization-tables table { margin: 1em 0 } 1.20 - #serialization-tables table { border-collapse: collapse } 1.21 - #serialization-tables tr:nth-child(even) { background: rgba(0, 0, 0, .1) } 1.22 - #serialization-tables th { padding: .2em .5em; line-height: 1.1; font-size: 90% } 1.23 - #serialization-tables th, td { text-align: center } 1.24 - </style> 1.25 - 1.26 - <a class=self-link href=#serialization-tables></a> 1.27 + <div class=note id=serialization-tables><a class=self-link href=#serialization-tables></a> 1.28 Note: In order to satisfy this requirement: 1.29 1.30 <p> <ul> 1.31 <li> 1.32 - A <a class="production css-code" data-link-type=type href=#typedef-delim-token title="<delim-token>"><delim-token></a> containing U+005C REVERSE SOLIDUS (\) 1.33 - must be followed when serialized by a <a data-link-type=dfn href=#newline title=newline>newline</a>. 1.34 + A <a class="production css-code" data-link-type=type href=#typedef-delim-token title="<delim-token>"><delim-token></a> containing U+005C REVERSE SOLIDUS (\)\ 1.35 + must be serialized as U+005C REVERSE SOLIDUS 1.36 + followed by a <a data-link-type=dfn href=#newline title=newline>newline</a>. 1.37 (The tokenizer only ever emits such a token followed by a <a class="production css-code" data-link-type=type href=#typedef-whitespace-token title="<whitespace-token>"><whitespace-token></a> 1.38 that starts with a newline.) 1.39 <li> 1.40 - Consecutive pairs of tokens that have a ✓ in either of the two tables below 1.41 - must be serialized with a comment in-between. 1.42 - If no comment was preserved from tokenization, 1.43 - an empty comment <code>/**/</code> should be inserted. 1.44 - Rows and columns represent a token and its following token, respectively. 1.45 - Single character represent a <a class="production css-code" data-link-type=type href=#typedef-delim-token title="<delim-token>"><delim-token></a> with that value, 1.46 - except for "<code>(</code>" that 1.47 - represents a <a href=#tokendef-open-paren>(-token</a>. 1.48 + 1.49 +<p> For any consecutive pair of tokens, 1.50 + if the first token shows up in the row headings of either of the following two tables, 1.51 + and the second token shows up in the column headings, 1.52 + and there’s a ✓ in the cell denoted by the intersection of the chosen row and column, 1.53 + the pair of tokens must be serialized with a comment between them. 1.54 + 1.55 +<p> If the tokenizer preserves comments, 1.56 + the preserved comment should be used; 1.57 + otherwise, an empty comment (<code>/**/</code>) must be inserted. 1.58 + (Preserved comments may be reinserted even if the following tables don’t require a comment between two tokens.) 1.59 + 1.60 +<p> Single characters in the row and column headings represent a <a class="production css-code" data-link-type=type href=#typedef-delim-token title="<delim-token>"><delim-token></a> with that value, 1.61 + except for "<code>(</code>", 1.62 + which represents a <a href=#tokendef-open-paren>(-token</a>. 1.63 </ul> 1.64 1.65 - <table> 1.66 + <table class=data> 1.67 <tr> 1.68 <td> 1.69 <th>ident 1.70 @@ -4549,7 +4550,7 @@ 1.71 <td><td><td><td><td><td>✓<td>✓<td>✓<td><td><td> 1.72 </table> 1.73 1.74 - <table> 1.75 + <table class=data> 1.76 <tr> 1.77 <td> 1.78 <th>=<th>|<th>*
2.1 --- a/css-syntax/Overview.src.html Fri Nov 01 10:57:08 2013 -0700 2.2 +++ b/css-syntax/Overview.src.html Fri Nov 01 11:17:56 2013 -0700 2.3 @@ -2969,42 +2969,43 @@ 2.4 In particular, the serialization of comments an whitespace is not defined. 2.5 2.6 The only requirement for serialization is that it must "round-trip" with parsing, 2.7 - ie. parsing again the serialized output must result in identical tokens or other structures, 2.8 - except for consecutive <<whitespace-token>>s 2.9 - that may be collapsed into a single token. 2.10 + that is, parsing the stylesheet must produce the same data structures as 2.11 + parsing, serializing, and parsing again, 2.12 + except for consecutive <<whitespace-token>>s, 2.13 + which may be collapsed into a single token. 2.14 2.15 Note: This exception can exist because 2.16 CSS grammars always interpret any amount of whitespace as identical to a single space. 2.17 2.18 - <div class=note id=serialization-tables> 2.19 + <div class=note id='serialization-tables'> 2.20 Note: In order to satisfy this requirement: 2.21 2.22 <ul> 2.23 <li> 2.24 - A <<delim-token>> containing U+005C REVERSE SOLIDUS (\) 2.25 - must be followed when serialized by a <a>newline</a>. 2.26 + A <<delim-token>> containing U+005C REVERSE SOLIDUS (\)\ 2.27 + must be serialized as U+005C REVERSE SOLIDUS 2.28 + followed by a <a>newline</a>. 2.29 (The tokenizer only ever emits such a token followed by a <<whitespace-token>> 2.30 that starts with a newline.) 2.31 <li> 2.32 - Consecutive pairs of tokens that have a ✓ in either of the two tables below 2.33 - must be serialized with a comment in-between. 2.34 - If no comment was preserved from tokenization, 2.35 - an empty comment <code>/**/</code> should be inserted. 2.36 - Rows and columns represent a token and its following token, respectively. 2.37 - Single character represent a <<delim-token>> with that value, 2.38 - except for "<code>(</code>" that 2.39 - represents a <a href=#tokendef-open-paren>(-token</a>. 2.40 + 2.41 + For any consecutive pair of tokens, 2.42 + if the first token shows up in the row headings of either of the following two tables, 2.43 + and the second token shows up in the column headings, 2.44 + and there's a ✓ in the cell denoted by the intersection of the chosen row and column, 2.45 + the pair of tokens must be serialized with a comment between them. 2.46 + 2.47 + If the tokenizer preserves comments, 2.48 + the preserved comment should be used; 2.49 + otherwise, an empty comment (<code>/**/</code>) must be inserted. 2.50 + (Preserved comments may be reinserted even if the following tables don't require a comment between two tokens.) 2.51 + 2.52 + Single characters in the row and column headings represent a <<delim-token>> with that value, 2.53 + except for "<code>(</code>", 2.54 + which represents a <a href=#tokendef-open-paren>(-token</a>. 2.55 </ul> 2.56 2.57 - <style> 2.58 - #serialization-tables table { margin: 1em 0 } 2.59 - #serialization-tables table { border-collapse: collapse } 2.60 - #serialization-tables tr:nth-child(even) { background: rgba(0, 0, 0, .1) } 2.61 - #serialization-tables th { padding: .2em .5em; line-height: 1.1; font-size: 90% } 2.62 - #serialization-tables th, td { text-align: center } 2.63 - </style> 2.64 - 2.65 - <table> 2.66 + <table class='data'> 2.67 <tr> 2.68 <td> 2.69 <th>ident 2.70 @@ -3053,7 +3054,7 @@ 2.71 <td><td><td><td><td><td>✓<td>✓<td>✓<td><td><td> 2.72 </table> 2.73 2.74 - <table> 2.75 + <table class='data'> 2.76 <tr> 2.77 <td> 2.78 <th>=<th>|<th>*