|
5 | 5 | profile="http://microformats.org/profile/hcard http://microformats.org/wiki/rel-license"> |
6 | 6 | <title>CSS Grid Template Layout Module</title> |
7 | 7 | <meta content="text/html; charset=utf-8" http-equiv=content-type> |
8 | | - <link href=default.css rel=stylesheet type="text/css"> |
| 8 | + <link href="../default.css" rel=stylesheet type="text/css"> |
9 | 9 |
|
10 | 10 | <style type="text/css"> |
11 | 11 | /* Just in case an incorrect max-width occurs in default.css */ |
|
36 | 36 | <h1>CSS Grid Template Layout Module</h1> |
37 | 37 | <!--=================================================================--> |
38 | 38 | <h2 class="no-num no-toc" id=longstatus-date-3-august-2004>Editor's Draft |
39 | | - 1 May 2012</h2> |
| 39 | + 8 May 2012</h2> |
40 | 40 |
|
41 | 41 | <dl> |
42 | 42 | <dt>This version: |
43 | 43 |
|
44 | 44 | <dd><a |
45 | | - href="http://www.w3.org/TR/2012/ED-css3-layout-20120501/">http://www.w3.org/TR/2012/ED-css3-layout-20120501/</a> |
| 45 | + href="http://www.w3.org/TR/2012/ED-css3-layout-20120508/">http://www.w3.org/TR/2012/ED-css3-layout-20120508/</a> |
46 | 46 |
|
47 | 47 |
|
48 | 48 | <dt>Latest version: |
@@ -273,7 +273,7 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2> |
273 | 273 | </span>Floating elements inside templates</a> |
274 | 274 | </ul> |
275 | 275 |
|
276 | | - <li><a href="#page-templates"><span class=secno>7. </span> Page-based grid |
| 276 | + <li><a href="#page-templates"><span class=secno>7. </span>Page-based grid |
277 | 277 | templates</a> |
278 | 278 |
|
279 | 279 | <li><a href="#chains"><span class=secno>8. </span>Chaining slots: the |
@@ -3062,6 +3062,30 @@ <h3 id=vertical-alignment><span class=secno>6.1. </span>Vertical alignment |
3062 | 3062 | edge</dfn> and <dfn id=head-edge>head edge</dfn> of a box as a |
3063 | 3063 | writing-mode-dependent edge as follows: |
3064 | 3064 |
|
| 3065 | + <div class=issue> |
| 3066 | + <p>Especially in paged material, it is very common for a column of text to |
| 3067 | + be not just aligned or centered, but vertically “justified” to align |
| 3068 | + at both top and bottom, by a combination of means: scaling an image (if |
| 3069 | + there is one available), changing the line height, changing the vertical |
| 3070 | + margins, etc. Probably the easiest to specify in CSS is an elastic |
| 3071 | + margin, e.g.: |
| 3072 | + |
| 3073 | + <pre>margin-top: 1.2em + 1fill - 0.6em</pre> |
| 3074 | + |
| 3075 | + <p>(Which could mean: preferred width is 1.2em, may be increased without |
| 3076 | + limit, may be decreased by no more than 0.6em.) To increase the padding |
| 3077 | + instead of the margin, the ‘<code class=property>flex</code>’ |
| 3078 | + property from css3-flex might be useful: |
| 3079 | + |
| 3080 | + <pre>flex: 1</pre> |
| 3081 | + |
| 3082 | + <p>although that doesn't say at which side the padding is added and thus |
| 3083 | + requires another property to align the content inside the box. A more |
| 3084 | + direct way could be: |
| 3085 | + |
| 3086 | + <pre>padding-top: 0.5em + 1fill</pre> |
| 3087 | + </div> |
| 3088 | + |
3065 | 3089 | <table class=equiv-table> |
3066 | 3090 | <thead> |
3067 | 3091 | <tr> |
@@ -3370,10 +3394,10 @@ <h3 id=floating-elements-inside-templates><span class=secno>6.4. |
3370 | 3394 | needs to be extended to apply to slots: ‘<code class=css>@footnote |
3371 | 3395 | :first::slot(a)</code>’ is the footnote area of slot a on the first |
3372 | 3396 | page. |
| 3397 | + <!--=================================================================--> |
3373 | 3398 |
|
3374 | 3399 | <div class=level4> |
3375 | | - <!--=================================================================--> |
3376 | | - <h2 id=page-templates><span class=secno>7. </span> Page-based grid |
| 3400 | + <h2 id=page-templates><span class=secno>7. </span>Page-based grid |
3377 | 3401 | templates</h2> |
3378 | 3402 |
|
3379 | 3403 | <p>A template can also be attached to a page, rather than an element. Such |
@@ -3476,6 +3500,45 @@ <h2 id=page-templates><span class=secno>7. </span> Page-based grid |
3476 | 3500 | that a UA has to print a page (force page breaks) even though some slots |
3477 | 3501 | aren't filled yet. |
3478 | 3502 |
|
| 3503 | + <div class=example> |
| 3504 | + <p>This example shows a document with text in two languages, which are to |
| 3505 | + be shown side by side: |
| 3506 | + |
| 3507 | + <pre> |
| 3508 | +@page {grid: "a b"} |
| 3509 | +:lang(en) {flow: a} |
| 3510 | +:lang(fr) {flow: b} |
| 3511 | +</pre> |
| 3512 | + |
| 3513 | + <p>This works with a document where the languages are separated like |
| 3514 | + this: |
| 3515 | + |
| 3516 | + <pre> |
| 3517 | +<BODY> |
| 3518 | + <DIV LANG=en> |
| 3519 | + <H1>The blue house</H1> |
| 3520 | + ... |
| 3521 | + </DIV> |
| 3522 | + <DIV LANG=fr> |
| 3523 | + <H1>La maison bleue</H1> |
| 3524 | + ... |
| 3525 | + </DIV> |
| 3526 | +</BODY> |
| 3527 | +</pre> |
| 3528 | + |
| 3529 | + <p>But also with a document where the languages are interleaved: |
| 3530 | + |
| 3531 | + <pre> |
| 3532 | +<BODY> |
| 3533 | + <H1 LANG=en> |
| 3534 | + <H1 LANG=fr> |
| 3535 | + <P LANG=en>... |
| 3536 | + <P LANG=fr>... |
| 3537 | + ... |
| 3538 | +</BODY> |
| 3539 | +</pre> |
| 3540 | + </div> |
| 3541 | + |
3479 | 3542 | <div class=example> |
3480 | 3543 | <p>This example shows how the first page may have a different layout from |
3481 | 3544 | the other pages. The slot ‘<code class=css>a</code>’ only |
|
0 commit comments