|
11 | 11 | type="text/css"> |
12 | 12 |
|
13 | 13 | <style type="text/css"> |
| 14 | + .sidenote-block { |
| 15 | + border: 1px solid gray; |
| 16 | + margin: auto; |
| 17 | + text-align: left; |
| 18 | + padding: 4pt; |
| 19 | + position: relative; |
| 20 | + max-width: 400pt; |
| 21 | + } |
| 22 | + .sidenote-body { |
| 23 | + margin-left: 120pt; |
| 24 | + font-size: 12pt; |
| 25 | + line-height: 18pt; |
| 26 | + } |
| 27 | + .sidenote-note { |
| 28 | + font-size: 10pt; |
| 29 | + line-height: 18pt; |
| 30 | + position: absolute; left: 4pt; top: 4pt; |
| 31 | + width: 100pt; |
| 32 | + } |
14 | 33 | </style> |
15 | 34 |
|
16 | 35 | <body> |
|
20 | 39 |
|
21 | 40 | <h1>CSS Line Grid Module</h1> |
22 | 41 |
|
23 | | - <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 28 April 2011</h2> |
| 42 | + <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 29 April 2011</h2> |
24 | 43 |
|
25 | 44 | <dl> |
26 | 45 | <dt>This version: |
27 | 46 |
|
28 | | - <dd><a href="http://www.w3.org/TR/2011/ED-unknown-shortname-20110428"> |
29 | | - http://www.w3.org/TR/2011/ED-unknown-shortname-20110428</a> <!-- |
| 47 | + <dd><a href="http://www.w3.org/TR/2011/ED-unknown-shortname-20110429"> |
| 48 | + http://www.w3.org/TR/2011/ED-unknown-shortname-20110429</a> <!-- |
30 | 49 | <dt>Latest version: |
31 | 50 | <dd><a href="http://www.w3.org/TR/css-line-grid"> |
32 | 51 | http://www.w3.org/TR/css-line-grid</a> |
@@ -197,15 +216,20 @@ <h3 id=context><span class=secno>1.1. </span>Background</h3> |
197 | 216 | <p>This specification provides features to align lines and blocks to |
198 | 217 | invisible grids in the document. |
199 | 218 |
|
200 | | - <p>Alinging lines and blocks to grids gives the following benefits: |
| 219 | + <p>Aligning lines and blocks to grids gives the following benefits: |
201 | 220 |
|
202 | 221 | <ul> |
203 | 222 | <li>Keep vertical rhythm for better readability. |
204 | 223 |
|
205 | 224 | <li>Align lines between columns in multi-column documents. |
206 | 225 |
|
207 | 226 | <li>Make the top and the bottom margins of pictures equal, while keeping |
208 | | - the vertical rhythm of text before and after the pictures. |
| 227 | + the vertical rhythm of text before and after the pictures.</li> |
| 228 | + <!-- |
| 229 | + <li>Aligning to grids can sometimes be turned off for objects like tables, |
| 230 | + but then turned back on for the following text |
| 231 | + to the same grids as the one for the text before the objects.</li> |
| 232 | + --> |
209 | 233 |
|
210 | 234 | <li>Layout lines at the same position in every page in paged media. |
211 | 235 | Keeping the position of the bottom line of a page has benefits for design |
@@ -235,14 +259,29 @@ <h3 id=context><span class=secno>1.1. </span>Background</h3> |
235 | 259 | of text in a multi-column document.</p> |
236 | 260 | </div> |
237 | 261 |
|
| 262 | + <div class=figure> |
| 263 | + <div class=sidenote-block> |
| 264 | + <div class=sidenote-body> Sidenotes (and footnotes for that matter) are |
| 265 | + often set at a smaller size to the basic text. This smaller text should |
| 266 | + still line up with basic text. Authors can achieve this effect by |
| 267 | + calculating appropriate font-size, line-height, and margins*.</div> |
| 268 | + |
| 269 | + <div class=sidenote-note> This module makes it much easier and more |
| 270 | + robust.</div> |
| 271 | + </div> |
| 272 | + |
| 273 | + <p class=caption>Sidenotes set at a smaller size, but still line up with |
| 274 | + basic text.</p> |
| 275 | + </div> |
| 276 | + |
238 | 277 | <p>This module defines following capabilities: |
239 | 278 |
|
240 | 279 | <ul> |
241 | 280 | <li>Defines grids in the line progression direction. |
242 | 281 |
|
243 | 282 | <li>Controls how lines and blocks align to the grids. |
244 | 283 |
|
245 | | - <li>Rounds lengths down to mulitple of units. |
| 284 | + <li>Rounds lengths down to multiple of units. |
246 | 285 | </ul> |
247 | 286 |
|
248 | 287 | <p>It is important to control these capabilities independently, so that |
@@ -359,9 +398,9 @@ <h3 id=layout-grid-line-prop><span class=secno>2.1. </span>Define Line |
359 | 398 | module: text WD 20010517</a>. |
360 | 399 |
|
361 | 400 | <p class=issue>Grid origin should be defined by the element that has this |
362 | | - property, similar to ‘<code class=css>display: static</code>’. |
363 | | - In that case, should this property inherit, or not inherit the property |
364 | | - but inherit grid? |
| 401 | + property, similar to ‘<code class=css>position: |
| 402 | + static</code>’. In that case, should this property inherit, or not |
| 403 | + inherit the property but inherit grid? |
365 | 404 |
|
366 | 405 | <h2 id=using-grids><span class=secno>3. </span>Using Grids</h2> |
367 | 406 |
|
@@ -529,18 +568,33 @@ <h3 id=grid-length-unit><span class=secno>3.3. </span>The ‘<code |
529 | 568 |
|
530 | 569 | <p class=issue>Just copied from old WD, need to refresh |
531 | 570 |
|
532 | | - <p class=issue>Use cases for non-East Asian layouts? |
| 571 | + <div class=example id=vert-rhythm-p-margin> |
| 572 | + <p>The most common addition of vertical space is that inserted between |
| 573 | + paragraphs. If the rhythm of the page is to be maintained, the spacing of |
| 574 | + paragraphs should be related to the basic leading. This is achieved by |
| 575 | + setting top- and bottom-margins equal to ‘<code |
| 576 | + class=css>1gd</code>’. |
| 577 | + |
| 578 | + <pre><code class=css> |
| 579 | +<!-- -->p { |
| 580 | +<!-- --> layout-grid-line: 1.5; |
| 581 | +<!-- --> layout-grid-mode: baseline; |
| 582 | +<!-- --> margin-top: 1gd; |
| 583 | +<!-- --> margin-bottom: 1gd; |
| 584 | +<!-- -->} |
| 585 | +<!-- --></code></pre> |
| 586 | + </div> |
533 | 587 |
|
534 | 588 | <div class=example id=gyou-dori> |
535 | | - <p>East Asian layout often requires heights specified by multiple of the |
| 589 | + <p>East Asian layout often requires heights specified by the count of the |
536 | 590 | line grids. In Japanese, this method is called Gyou-dori. Refer to <a |
537 | 591 | href="#JLREQ" rel=biblioentry>[JLREQ]<!--{{JLREQ}}--></a> for more |
538 | 592 | details of Gyou-dori.</p> |
539 | 593 |
|
540 | 594 | <pre><code class=css> |
541 | 595 | <!-- -->h1 { |
542 | 596 | <!-- --> line-grid-mode: block; |
543 | | -<!-- --> min-height: 3gd; |
| 597 | +<!-- --> min-height: 3gd; /* 3 Gyou-dori */ |
544 | 598 | <!-- -->} |
545 | 599 | <!-- --></code></pre> |
546 | 600 | </div> |
|
0 commit comments