|
12 | 12 | rel=dcterms.rights> |
13 | 13 | <meta content="CSS Line Grid Module Level 1" name=dcterms.title> |
14 | 14 | <meta content=text name=dcterms.type> |
15 | | - <meta content=2014-05-06 name=dcterms.date> |
| 15 | + <meta content=2014-07-18 name=dcterms.date> |
16 | 16 | <meta content="Elika Etemad" name=dcterms.creator> |
17 | 17 | <meta content="Koji Ishii" name=dcterms.creator> |
18 | 18 | <meta content="Alan Stearns" name=dcterms.creator> |
|
51 | 51 |
|
52 | 52 | <h1>CSS Line Grid Module Level 1</h1> |
53 | 53 |
|
54 | | - <h2 class="no-num no-toc">Editor's Draft 6 May 2014</h2> |
| 54 | + <h2 class="no-num no-toc">Editor's Draft 18 July 2014</h2> |
55 | 55 |
|
56 | 56 | <dl> |
57 | 57 | <dt>This version: |
58 | 58 |
|
59 | 59 | <dd><a href="http://dev.w3.org/csswg/css-line-grid-1/"> |
60 | | - http://www.w3.org/TR/2014/ED-css-line-grid-1-20140506/</a> |
| 60 | + http://www.w3.org/TR/2014/ED-css-line-grid-1-20140718/</a> |
61 | 61 |
|
62 | 62 | <dt>Latest version: |
63 | 63 |
|
@@ -502,12 +502,12 @@ <h3 id=line-snap><span class=secno>3.1. </span> Snapping Line Boxes: the |
502 | 502 |
|
503 | 503 | <p>This property applies to all the line boxes directly contained by the |
504 | 504 | element, and, when not ‘<a href="#none0"><code |
505 | | - class=css>none</code></a>’, causes each line box to shift downward |
506 | | - (possibly by zero) until it snaps to the line grid specified by ‘<a |
507 | | - href="#line-grid0"><code class=property>line-grid</code></a>’. (The |
508 | | - unshifted position is the position that would be determined by normal line |
509 | | - stacking rules, with consideration of any new controls defined by other |
510 | | - modules such as <a href="#ref-CSS3LINE" |
| 505 | + class=css>none</code></a>’, causes each line box to shift (usually |
| 506 | + downward, possibly by zero) until it snaps to the line grid specified by |
| 507 | + ‘<a href="#line-grid0"><code class=property>line-grid</code></a>’. |
| 508 | + (The unshifted position is the position that would be determined by normal |
| 509 | + line stacking rules, with consideration of any new controls defined by |
| 510 | + other modules such as <a href="#ref-CSS3LINE" |
511 | 511 | rel=biblioentry>[CSS3LINE]<!--{{CSS3LINE}}--></a>.) Values have the |
512 | 512 | following meanings: |
513 | 513 |
|
@@ -541,6 +541,56 @@ <h3 id=line-snap><span class=secno>3.1. </span> Snapping Line Boxes: the |
541 | 541 | line box so as to allow the line to snap without jumping downward to the |
542 | 542 | next grid line. |
543 | 543 |
|
| 544 | + <div class=example> |
| 545 | + <p>When a block is start-aligned, its line boxes will always shift |
| 546 | + downward when snapping to a line grid. Here and in the next two examples |
| 547 | + there are two lines (A and B) with line-snap:none and two or three lines |
| 548 | + (1, 2 and 3) with line-snap:baseline. Here lines 1, 2 and 3 shift down to |
| 549 | + snap their baselines to the line grid. |
| 550 | + <figure style="float:left;"> <img alt="line positions before snapping" |
| 551 | + src="images/top-no-snap.png"> <figcaption> Before snapping </figcaption> |
| 552 | + </figure> <figure style="float:left;"> <img |
| 553 | + alt="line positions after snapping" src="images/top-snapped.png"> |
| 554 | + <figcaption> After line snapping </figcaption> </figure></div> |
| 555 | + |
| 556 | + <div class=example> |
| 557 | + <p>A center-aligned block's line boxes shift nearly the same as a |
| 558 | + start-aligned block's. All the lines except for the very first snapped |
| 559 | + line (line 1 in this example) shift exactly the same as a start-aligned |
| 560 | + block. Then the block is centered, and the shortest distance from the |
| 561 | + first snapped line's baseline to a grid line is measured. |
| 562 | + |
| 563 | + <p> If the closest grid line is in the block-start direction, then the |
| 564 | + entire block is shifted up from the block-end edge to snap the first line |
| 565 | + to the grid when the block is centered again. |
| 566 | + <figure style="float:left;"> <img alt="line positions at step 1" |
| 567 | + src="images/first-center-part-snapped.png"> <figcaption> Partial snapping |
| 568 | + </figcaption> </figure> <figure style="float:left;"> <img |
| 569 | + alt="line positions after full snapping" |
| 570 | + src="images/first-center-snapped.png"> <figcaption> Full line snapping |
| 571 | + </figcaption> </figure> |
| 572 | + <p style="clear:left;">If the closest grid line is in the block-end |
| 573 | + direction, then the first snapped line is shifted downward to snap the |
| 574 | + first line to the grid when the block is centered again. |
| 575 | + <figure style="float:left;"> <img alt="line positions at step 1" |
| 576 | + src="images/second-center-part-snapped.png"> <figcaption> Partial snapping |
| 577 | + </figcaption> </figure> <figure style="float:left;"> <img |
| 578 | + alt="line positions after full snapping" |
| 579 | + src="images/second-center-snapped.png"> <figcaption> Full line snapping |
| 580 | + </figcaption> </figure></div> |
| 581 | + |
| 582 | + <div class=example> |
| 583 | + <p>An end-aligned block shifts snapped lines upward from the block-end |
| 584 | + direction. The shifting distance between any two adjacent snapped lines |
| 585 | + will be the same as in the other alignment cases. The main difference is |
| 586 | + that the shifting between snapped and not-snapped lines (or the block |
| 587 | + edge) occurs below the snapped lines. |
| 588 | + <figure style="float:left;"> <img alt="line positions before snapping" |
| 589 | + src="images/bottom-no-snap.png"> <figcaption> Before snapping |
| 590 | + </figcaption> </figure> <figure style="float:left;"> <img |
| 591 | + alt="line positions after snapping" src="images/bottom-snapped.png"> |
| 592 | + <figcaption> After line snapping </figcaption> </figure></div> |
| 593 | + |
544 | 594 | <h3 id=box-snap><span class=secno>3.2. </span> Snapping Block Boxes: the |
545 | 595 | ‘<a href="#box-snap0"><code class=property>box-snap</code></a>’ |
546 | 596 | property</h3> |
|
0 commit comments