Skip to content

Commit c991adc

Browse files
author
dauwhe
committed
[css-inline]] add text and examples for interactions of initial letters with surrounding elements
1 parent 5b057e9 commit c991adc

5 files changed

Lines changed: 87 additions & 38 deletions

File tree

css-inline/Overview.bs

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2419,6 +2419,9 @@ Some styles of drop initials do not align with the first line of text. For examp
24192419

24202420

24212421

2422+
2423+
2424+
24222425
<div class="example">
24232426

24242427
<figure>
@@ -2456,6 +2459,9 @@ p::first-letter {
24562459
</div>
24572460

24582461

2462+
2463+
2464+
24592465
<h3 id="aligning-initial-letter">Alignment of Initial Letters</h3>
24602466

24612467
As mentioned earlier, the alignment of initial letters depends on the script used. The 'initial-letter-align' property can be used to specify the proper alignment.
@@ -2519,9 +2525,39 @@ Text should be excluded around the glyph bounding boxes of the initial letters:
25192525
<p class="caption">Correct: text excluded around glyph bounding box</p>
25202526
</figure>
25212527

2522-
<p class="issue">When the initial letter has a descender, we can say that the other text should be excluded around the em-square. But for characters without descenders, this is undesirable. How do we spec this?</p>
25232528

2524-
<p class="issue">Add content about what happens when initial letter extends into subsequent paragraphs, where the subsequent paragraph may or may not have initial letters.</p>
2529+
<h3 id="initial-letter-paragraphs">Interactions of initial letters with surrounding paragraphs</h3>
2530+
2531+
<h4>Raised and sunken caps</h4>
2532+
2533+
An initial letter does not affect the position of its containing element. For “raised caps” or “sunken caps,” the effect is created as if the text around the initial letter was pushed down, rather than the letter extending up into previous elements.
2534+
2535+
2536+
<figure>
2537+
<img src="initial-letter-drop-para-compare.png" alt="raised cap para after normal para" width="600"/>
2538+
<p class="caption">Raised cap (<code>initial-letter: 1 3</code>) on right; note that the position of the “C” is the same in both cases, but on the right all text is moved down relative to the initial letter.</p>
2539+
</figure>
2540+
2541+
2542+
<h4>Short paragraphs with initial letters</h4>
2543+
2544+
A paragraph with an initial letter may have fewer lines of text than the initial letter occupies. The initial letter acts as if it is a float, and the subsequent para may wrap around it.
2545+
2546+
<figure>
2547+
<img src="initial-letter-short-para.png" alt="short para with initial letter" width="480"/>
2548+
<p class="caption">The red text is a short paragraph with an initial letter. Note the subsequent paragraph wraps around the initial letter as if it were a float.</p>
2549+
</figure>
2550+
2551+
If the subsequent paragraph also has an initial letter, then that initial letter must clear the float of the previous initial letter.
2552+
2553+
<figure>
2554+
<img src="initial-letter-short-para-initial.png" alt="short para with initial letter followed by para with initial" width="480"/>
2555+
<p class="caption">The red text is a short paragraph with an initial letter. If the subsequent paragraph also has an initial letter, its initial letter clears as if it was a float, too.</p>
2556+
</figure>
2557+
2558+
2559+
2560+
25252561

25262562
<p class="issue">Define appropriate behavior for non-western scripts. The editors would appreciate any examples of drop initials in such scripts.</p>
25272563

css-inline/Overview.html

Lines changed: 49 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
</p>
6161
<h1 class="p-name no-ref" id=title>CSS Inline Layout Module Level 3</h1>
6262
<h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft,
63-
<span class=dt-updated><span class=value-title title=20140804>4 August 2014</span></span></span></h2>
63+
<span class=dt-updated><span class=value-title title=20140814>14 August 2014</span></span></span></h2>
6464
<div data-fill-with=spec-metadata><dl>
6565
<dt>This version:
6666
<dd><a class=u-url href=http://dev.w3.org/csswg/css-inline/>http://dev.w3.org/csswg/css-inline/</a>
@@ -155,7 +155,11 @@ <h2 class="no-num no-toc no-ref heading settled heading" id=contents><span class
155155
<li><a href=#selecting-drop-initials><span class=secno>3.3</span> Selecting Initial Letters</a>
156156
<li><a href=#sizing-drop-initials><span class=secno>3.4</span> Creating Initial Letters: The <span class=property data-link-type=propdesc title=initial-letter>initial-letter</span> Property</a>
157157
<li><a href=#aligning-initial-letter><span class=secno>3.5</span> Alignment of Initial Letters</a>
158-
<li><a href=#initial-letter-exclusions><span class=secno>3.6</span> Space Around Initial Letters</a></ul>
158+
<li><a href=#initial-letter-exclusions><span class=secno>3.6</span> Space Around Initial Letters</a>
159+
<li><a href=#initial-letter-paragraphs><span class=secno>3.7</span> Interactions of initial letters with surrounding paragraphs</a>
160+
<ul class=toc>
161+
<li><a href=#raised-and-sunken-caps><span class=secno>3.7.1</span> Raised and sunken caps</a>
162+
<li><a href=#short-paragraphs-with-initial-letters><span class=secno>3.7.2</span> Short paragraphs with initial letters</a></ul></ul>
159163
<li><a href=#properties><span class=secno>4</span> Properties index</a>
160164
<li><a href=#profiles><span class=secno>5</span> Profiles</a>
161165
<li><a href=#BaselineUsage><span class=secno></span> Appendix A: Usage of baseline alignment (informative)</a>
@@ -2526,6 +2530,9 @@ <h3 class="heading settled heading" data-level=3.4 id=sizing-drop-initials><span
25262530

25272531

25282532

2533+
2534+
2535+
25292536
<div class=example>
25302537

25312538
<figure>
@@ -2561,6 +2568,9 @@ <h3 class="heading settled heading" data-level=3.4 id=sizing-drop-initials><span
25612568
</div>
25622569

25632570

2571+
2572+
2573+
25642574
<h3 class="heading settled heading" data-level=3.5 id=aligning-initial-letter><span class=secno>3.5 </span><span class=content>Alignment of Initial Letters</span><a class=self-link href=#aligning-initial-letter></a></h3>
25652575

25662576
<p>As mentioned earlier, the alignment of initial letters depends on the script used. The <a class=property data-link-type=propdesc href=#propdef-initial-letter-align title=initial-letter-align>initial-letter-align</a> property can be used to specify the proper alignment.</p>
@@ -2614,9 +2624,39 @@ <h3 class="heading settled heading" data-level=3.6 id=initial-letter-exclusions>
26142624
<p class=caption>Correct: text excluded around glyph bounding box</p>
26152625
</figure>
26162626

2617-
<p class=issue id=issue-9cafd3f3><a class=self-link href=#issue-9cafd3f3></a>When the initial letter has a descender, we can say that the other text should be excluded around the em-square. But for characters without descenders, this is undesirable. How do we spec this?</p>
26182627

2619-
<p class=issue id=issue-95316d37><a class=self-link href=#issue-95316d37></a>Add content about what happens when initial letter extends into subsequent paragraphs, where the subsequent paragraph may or may not have initial letters.</p>
2628+
<h3 class="heading settled heading" data-level=3.7 id=initial-letter-paragraphs><span class=secno>3.7 </span><span class=content>Interactions of initial letters with surrounding paragraphs</span><a class=self-link href=#initial-letter-paragraphs></a></h3>
2629+
2630+
<h4 class="heading settled heading" data-level=3.7.1 id=raised-and-sunken-caps><span class=secno>3.7.1 </span><span class=content>Raised and sunken caps</span><a class=self-link href=#raised-and-sunken-caps></a></h4>
2631+
2632+
<p>An initial letter does not affect the position of its containing element. For “raised caps” or “sunken caps,” the effect is created as if the text around the initial letter was pushed down, rather than the letter extending up into previous elements.</p>
2633+
2634+
2635+
<figure>
2636+
<img alt="raised cap para after normal para" src=initial-letter-drop-para-compare.png width=600>
2637+
<p class=caption>Raised cap (<code>initial-letter: 1 3</code>) on right; note that the position of the “C” is the same in both cases, but on the right all text is moved down relative to the initial letter.</p>
2638+
</figure>
2639+
2640+
2641+
<h4 class="heading settled heading" data-level=3.7.2 id=short-paragraphs-with-initial-letters><span class=secno>3.7.2 </span><span class=content>Short paragraphs with initial letters</span><a class=self-link href=#short-paragraphs-with-initial-letters></a></h4>
2642+
2643+
<p>A paragraph with an initial letter may have fewer lines of text than the initial letter occupies. The initial letter acts as if it is a float, and the subsequent para may wrap around it.</p>
2644+
2645+
<figure>
2646+
<img alt="short para with initial letter" src=initial-letter-short-para.png width=480>
2647+
<p class=caption>The red text is a short paragraph with an initial letter. Note the subsequent paragraph wraps around the initial letter as if it were a float.</p>
2648+
</figure>
2649+
2650+
<p>If the subsequent paragraph also has an initial letter, then that initial letter must clear the float of the previous initial letter.</p>
2651+
2652+
<figure>
2653+
<img alt="short para with initial letter followed by para with initial" src=initial-letter-short-para-initial.png width=480>
2654+
<p class=caption>The red text is a short paragraph with an initial letter. If the subsequent paragraph also has an initial letter, its initial letter clears as if it was a float, too.</p>
2655+
</figure>
2656+
2657+
2658+
2659+
26202660

26212661
<p class=issue id=issue-79d884e2><a class=self-link href=#issue-79d884e2></a>Define appropriate behavior for non-western scripts. The editors would appreciate any examples of drop initials in such scripts.</p>
26222662

@@ -3263,18 +3303,11 @@ <h2 class="no-num no-ref heading settled heading" id=property-index><span class=
32633303
<tr><th scope=row><a class=css-code data-link-type=property href=#propdef-initial-letter-align title=initial-letter-align>initial-letter-align</a><td>[ auto | alphabetic | hanging | ideographic ]<td>auto<td>::first-letter pseudo elements and inline level first child of a block container<td>no<td>N/A<td>visual<td>???</table></div>
32643304

32653305

3266-
<h2 class="no-num heading settled" id=issues-index><span class=content>Issues Index</span><a class=self-link href=#issues-index></a></h2><div style="counter-reset: issue"><div class=issue>[LDB: I don’t understand this paragraph.]<a href=#issue-9934f9eb></a></div>
3267-
<div class=issue>This definition should be briefer, and should
3306+
<h2 class="no-num heading settled" id=issues-index><span class=content>Issues Index</span><a class=self-link href=#issues-index></a></h2><div style="counter-reset: issue"><div class=issue>[LDB: I don’t understand this paragraph.]<a href=#issue-9934f9eb></a></div><div class=issue>This definition should be briefer, and should
32683307
refer to the next section.<a href=#issue-5e1feaa0></a></div><div class=issue>[LDB: The second part of this sentence is a significant change from CSS2, and also doesn’t mauke senes in the context of the sentence.]<a href=#issue-508c6175></a></div><div class=issue>[LDB: This isn’t quite right. What about zwnj,
3269-
etc.?<a href=#issue-4b06b910></a></div>
3270-
3271-
<div class=issue>Should this split into inline-border and
3272-
inline-margin?<a href=#issue-42900629></a></div>
3273-
3274-
<div class=issue>[This is arbitrary. Does anyone have better
3275-
ideas?]<a href=#issue-25a5cd45></a></div>
3276-
3277-
<div class=issue>Concerns: * How does this work with the cascade? * What
3308+
etc.?<a href=#issue-4b06b910></a></div><div class=issue>Should this split into inline-border and
3309+
inline-margin?<a href=#issue-42900629></a></div><div class=issue>[This is arbitrary. Does anyone have better
3310+
ideas?]<a href=#issue-25a5cd45></a></div><div class=issue>Concerns: * How does this work with the cascade? * What
32783311
about determining the visual size of inline boxes?
32793312

32803313
<a href=#issue-f68e4558></a></div><div class=issue>[1] I believe the differences are restricted to the first
@@ -3283,24 +3316,4 @@ <h2 class="no-num heading settled" id=issues-index><span class=content>Issues In
32833316

32843317
<a href=#issue-588d4c54></a></div><div class=issue>[The value <span class=css data-link-type=maybe title=replaced>replaced</span> is not strictly needed. <span class=css data-link-type=maybe title=Inline-box>Inline-box</span> also
32853318
does the job, except that it is not automatically restricted to replaced
3286-
elements.]<a href=#issue-82f9eb8f></a></div>
3287-
3288-
<div class=issue>Input from Japanese typographers would be very helpful.<a href=#issue-91340f65></a></div>
3289-
3290-
<div class=issue>This figure is probably incorrect.<a href=#issue-ddff256b></a></div>
3291-
3292-
3293-
3294-
<div class=issue>Add content describing constraint that the block container have a baseline grid (or fixed line-height?).<a href=#issue-f229a1d3></a></div>
3295-
3296-
3297-
<div class=issue>Input from those knowledgeable about non-Western typographic traditions would be very helpful in describing the appropriate alignments. More values may be required for this property.<a href=#issue-209367a3></a></div>
3298-
3299-
<div class=issue>When the initial letter has a descender, we can say that the other text should be excluded around the em-square. But for characters without descenders, this is undesirable. How do we spec this?<a href=#issue-9cafd3f3></a></div>
3300-
3301-
<div class=issue>Add content about what happens when initial letter extends into subsequent paragraphs, where the subsequent paragraph may or may not have initial letters.<a href=#issue-95316d37></a></div>
3302-
3303-
<div class=issue>Define appropriate behavior for non-western scripts. The editors would appreciate any examples of drop initials in such scripts.<a href=#issue-79d884e2></a></div>
3304-
3305-
3306-
</div>
3319+
elements.]<a href=#issue-82f9eb8f></a></div><div class=issue>Input from Japanese typographers would be very helpful.<a href=#issue-91340f65></a></div><div class=issue>This figure is probably incorrect.<a href=#issue-ddff256b></a></div><div class=issue>Add content describing constraint that the block container have a baseline grid (or fixed line-height?).<a href=#issue-f229a1d3></a></div><div class=issue>Input from those knowledgeable about non-Western typographic traditions would be very helpful in describing the appropriate alignments. More values may be required for this property.<a href=#issue-209367a3></a></div><div class=issue>Define appropriate behavior for non-western scripts. The editors would appreciate any examples of drop initials in such scripts.<a href=#issue-79d884e2></a></div></div>
203 KB
Loading
57.1 KB
Loading
50.1 KB
Loading

0 commit comments

Comments
 (0)