8000 [css-line-grid] yet more example tweaks · simonwuelker/csswg-drafts@ffd309a · GitHub
Skip to content

Commit ffd309a

Browse files
committed
[css-line-grid] yet more example tweaks
1 parent ccf52e8 commit ffd309a

2 files changed

Lines changed: 32 additions & 18 deletions

File tree

css-line-grid/Overview.html

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
rel=dcterms.rights>
1313
<meta content="CSS Line Grid Module Level 1" name=dcterms.title>
1414
<meta content=text name=dcterms.type>
15-
<meta content=2014-07-21 name=dcterms.date>
15+
<meta content=2014-07-22 name=dcterms.date>
1616
<meta content="Elika Etemad" name=dcterms.creator>
1717
<meta content="Koji Ishii" name=dcterms.creator>
1818
<meta content="Alan Stearns" name=dcterms.creator>
@@ -51,13 +51,13 @@
5151

5252
<h1>CSS Line Grid Module Level 1</h1>
5353

54-
<h2 class="no-num no-toc">Editor's Draft 21 July 2014</h2>
54+
<h2 class="no-num no-toc">Editor's Draft 22 July 2014</h2>
5555

5656
<dl>
5757
<dt>This version:
5858

5959
<dd><a href="http://dev.w3.org/csswg/css-line-grid-1/">
60-
http://www.w3.org/TR/2014/ED-css-line-grid-1-20140721/</a>
60+
http://www.w3.org/TR/2014/ED-css-line-grid-1-20140722/</a>
6161

6262
<dt>Latest version:
6363

@@ -508,8 +508,12 @@ <h3 id=line-snap><span class=secno>3.1. </span> Snapping Line Boxes: the
508508
(The unshifted position is the position that would be determined by normal
509509
line stacking rules, with consideration of any new controls defined by
510510
other modules such as <a href="#ref-CSS3LINE"
511-
rel=biblioentry>[CSS3LINE]<!--{{CSS3LINE}}--></a>.) Values have the
512-
following meanings:
511+
rel=biblioentry>[CSS3LINE]<!--{{CSS3LINE}}--></a>.) Shifting line boxes in
512+
this way affects layout – it is not merely a display translation. If a
513+
line box is shifted downward, then subsequent line boxes will be laid out
514+
using the new shifted position as input to their line stacking rules.
515+
516+
<p>Values have the following meanings:
513517

514518
<dl>
515519
<dt><dfn id=none><code class=css>none</code></dfn>
@@ -572,18 +576,18 @@ <h3 id=line-snap><span class=secno>3.1. </span> Snapping Line Boxes: the
572576
baselines while maintaining centering.
573577

574578
<p> This can be done in two shift-and-center steps. First, shift the
575-
snapping lines as if there were no centering, then remove the shift for
576-
the very first snapping line and center the block. You can see the result
577-
in the partial shifting figure below. Note that the shift for lines 2 and
578-
3 are exactly the same as the full line snapping figure in the previous,
579-
top-aligned example.
579+
snapping lines as if there were no centering (as in figure 8 above), then
580+
remove the shift for the very first snapping line and center the block.
581+
You can see the result in the partial shifting figure below.
580582

581583
<p> In the second step, measure the distance from the first snapped line's
582584
baseline to the grid lines above and below, looking for the closest grid
583-
line to that baseline. If the closest grid line is in the block-start
584-
direction, then add space below the last line equal to twice that
585-
distance. Then the block is centered again, which will align all of the
586-
snapped lines to the grid.
585+
line to that baseline.
586+
587+
<p> If the closest grid line is in the block-start direction, then add
588+
space below the last line in the block equal to twice that distance. Then
589+
the block is centered again, which will align all of the snapped lines to
590+
the grid.
587591
<figure style="float:left;"> <img alt="line positions at step 1"
588592
src="images/first-center-part-snapped.png"> <figcaption> Partial shifting
589593
</figcaption> </figure> <figure style="float:left;"> <img

css-line-grid/Overview.src.html

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,15 @@ <h3 id=line-snap>
339339
(usually downward, possibly by zero) until it snaps to the line grid specified
340340
by 'line-grid'. (The unshifted position is the position that would be
341341
determined by normal line stacking rules, with consideration of any
342-
new controls defined by other modules such as [[CSS3LINE]].) Values
343-
have the following meanings:
342+
new controls defined by other modules such as [[CSS3LINE]].)
343+
Shifting line boxes in this way affects layout –
344+
it is not merely a display translation.
345+
If a line box is shifted downward,
346+
then subsequent line boxes will be laid out
347+
using the new shifted position as input
348+
to their line stacking rules.
349+
350+
<p>Values have the following meanings:
344351

345352
<dl>
346353
<dt><dfn>''none''</dfn>
@@ -406,10 +413,13 @@ <h3 id=line-snap>
406413
The block containing all of these lines might not be top-aligned within its container. In the figures below, the block containing the elements is centered. In a centered situation, you have to align baselines while maintaining centering.
407414
</p>
408415
<p>
409-
This can be done in two shift-and-center steps. First, shift the snapping lines as if there were no centering, then remove the shift for the very first snapping line and center the block. You can see the result in the partial shifting figure below. Note that the shift for lines 2 and 3 are exactly the same as the full line snapping figure in the previous, top-aligned example.
416+
This can be done in two shift-and-center steps. First, shift the snapping lines as if there were no centering (as in figure 8 above), then remove the shift for the very first snapping line and center the block. You can see the result in the partial shifting figure below.
417+
</p>
418+
<p>
419+
In the second step, measure the distance from the first snapped line's baseline to the grid lines above and below, looking for the closest grid line to that baseline.
410420
</p>
411421
<p>
412-
In the second step, measure the distance from the first snapped line's baseline to the grid lines above and below, looking for the closest grid line to that baseline. If the closest grid line is in the block-start direction, then add space below the last line equal to twice that distance. Then the block is centered again, which will align all of the snapped lines to the grid.
422+
If the closest grid line is in the block-start direction, then add space below the last line in the block equal to twice that distance. Then the block is centered again, which will align all of the snapped lines to the grid.
413423
</p>
414424
<figure style="float:left;">
415425
<img src="images/first-center-part-snapped.png"

0 commit comments

Comments
 (0)