|
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 */ |
@@ -2486,6 +2486,30 @@ <h3 id=vertical-alignment>Vertical alignment of the contents of slots</h3> |
2486 | 2486 | and <dfn>head edge</dfn> of a box as a writing-mode-dependent edge as |
2487 | 2487 | follows: |
2488 | 2488 |
|
| 2489 | +<div class=issue> |
| 2490 | +<p>Especially in paged material, it is very common for a column of |
| 2491 | +text to be not just aligned or centered, but vertically “justified” to |
| 2492 | +align at both top and bottom, by a combination of means: scaling an |
| 2493 | +image (if there is one available), changing the line height, changing |
| 2494 | +the vertical margins, etc. Probably the easiest to specify in CSS is |
| 2495 | +an elastic margin, e.g.: |
| 2496 | + |
| 2497 | +<pre>margin-top: 1.2em + 1fill - 0.6em</pre> |
| 2498 | + |
| 2499 | +<p>(Which could mean: preferred width is 1.2em, may be increased |
| 2500 | +without limit, may be decreased by no more than 0.6em.) To increase |
| 2501 | +the padding instead of the margin, the 'flex' property from css3-flex |
| 2502 | +might be useful: |
| 2503 | + |
| 2504 | +<pre>flex: 1</pre> |
| 2505 | + |
| 2506 | +<p>although that doesn't say at which side the padding is added and |
| 2507 | +thus requires another property to align the content inside the box. A |
| 2508 | +more direct way could be: |
| 2509 | + |
| 2510 | +<pre>padding-top: 0.5em + 1fill</pre> |
| 2511 | +</div> |
| 2512 | + |
2489 | 2513 | <table class=equiv-table> |
2490 | 2514 | <thead> |
2491 | 2515 | <tr><th>Value of 'writing-mode' <th>Meaning of “head” <th>Meaning of “tail” |
@@ -2749,11 +2773,10 @@ <h3>Floating elements inside templates</h3> |
2749 | 2773 | extended to apply to slots: '@footnote :first::slot(a)' is the footnote |
2750 | 2774 | area of slot a on the first page. |
2751 | 2775 |
|
2752 | | -<div class=level4> |
2753 | | - |
2754 | 2776 | <!--=================================================================--> |
2755 | 2777 |
|
2756 | | -<h2 id=page-templates> Page-based grid templates</h2> |
| 2778 | +<div class=level4> |
| 2779 | +<h2 id=page-templates>Page-based grid templates</h2> |
2757 | 2780 |
|
2758 | 2781 | <p>A template can also be attached to a page, rather than an element. |
2759 | 2782 | Such a template is called a <dfn>page-based template</dfn> as opposed |
@@ -2836,6 +2859,44 @@ <h2 id=page-templates> Page-based grid templates</h2> |
2836 | 2859 | that a UA has to print a page (force page breaks) even though some |
2837 | 2860 | slots aren't filled yet. |
2838 | 2861 |
|
| 2862 | +<div class=example> |
| 2863 | +<p>This example shows a document with text in two languages, which are |
| 2864 | +to be shown side by side: |
| 2865 | + |
| 2866 | +<pre> |
| 2867 | +@page {grid: "a b"} |
| 2868 | +:lang(en) {flow: a} |
| 2869 | +:lang(fr) {flow: b} |
| 2870 | +</pre> |
| 2871 | + |
| 2872 | +<p>This works with a document where the languages are separated like this: |
| 2873 | + |
| 2874 | +<pre> |
| 2875 | +<BODY> |
| 2876 | + <DIV LANG=en> |
| 2877 | + <H1>The blue house</H1> |
| 2878 | + ... |
| 2879 | + </DIV> |
| 2880 | + <DIV LANG=fr> |
| 2881 | + <H1>La maison bleue</H1> |
| 2882 | + ... |
| 2883 | + </DIV> |
| 2884 | +</BODY> |
| 2885 | +</pre> |
| 2886 | + |
| 2887 | +<p>But also with a document where the languages are interleaved: |
| 2888 | + |
| 2889 | +<pre> |
| 2890 | +<BODY> |
| 2891 | + <H1 LANG=en> |
| 2892 | + <H1 LANG=fr> |
| 2893 | + <P LANG=en>... |
| 2894 | + <P LANG=fr>... |
| 2895 | + ... |
| 2896 | +</BODY> |
| 2897 | +</pre> |
| 2898 | +</div> |
| 2899 | + |
2839 | 2900 | <div class=example> |
2840 | 2901 | <p>This example shows how the first page may have a different layout |
2841 | 2902 | from the other pages. The slot ''a'' only occurs on the first page. If |
|
0 commit comments