You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-inline/Overview.bs
+19-31Lines changed: 19 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ Link Defaults: css-fonts-3 (property) font-family
26
26
27
27
<h2>Line Heights and Baseline Alignment</h2>
28
28
29
-
<p class="issue">This section is being rewritten. Refer to <a href="http://www.w3.org/TR/CSS21/visudet.html#line-height">section 10.8</a> of [[CSS21]] for the normative CSS definition or the <a href="http://www.w3.org/TR/2002/WD-css3-linebox-20020515/">2002 Working Draft</a> if you want pretty pictures. (But ignore the old text, half of it's wrong.)</p>
29
+
<p class="issue">This section is being rewritten. Refer to <a href="http://www.w3.org/TR/CSS21/visudet.html#line-height">section 10.8</a> of [[CSS21]] for the normative CSS definition or the <a href="http://www.w3.org/TR/2002/WD-css3-linebox-20020515/">2002 Working Draft</a> if you want pretty pictures. (But ignore the old text, half of it's wrong. We're not specifying which half, that's to be determined.)</p>
30
30
31
31
32
32
@@ -122,34 +122,24 @@ The alignment constraints depend on the script used. In Japanese vertical writin
Initial letters are typically a single letter, which can be selected by the <code>::first-letter</code> pseudo-element, as defined in [[SELECT]]. Authors who need more control over which characters are included in an initial letter can also apply the 'initial-letter' property to the first inline child of a block container.
126
-
127
-
128
-
129
-
130
-
Only the following properties can be applied to the <code>::first-letter</code> pseudo-elements:
131
-
132
-
<ul>
133
-
<li>font properties</li>
134
-
<li>color properties</li>
135
-
<li>background properties</li>
136
-
<li>text decoration properties</li>
137
-
<li>baseline alignment properties (only if 'float' is ''none'')</li>
138
-
<li>'text-transform'</li>
139
-
<li>'letter-spacing'</li>
140
-
<li>'line-height' (may be ignored depending on the block line-stacking strategy)</li>
141
-
<li>margin properties</li>
142
-
<li>padding properties</li>
143
-
<li>border properties</li>
144
-
<li>'float'</li>
145
-
<li>text-shadow</li>
146
-
<li>'clear'</li>
147
-
<li>'initial-letter'</li>
148
-
<li>'initial-letter-align'</li>
149
-
</ul>
150
-
125
+
Initial letters are typically a single letter, which can be selected by the <code>::first-letter</code> pseudo-element, as defined in [[SELECT]].
151
126
127
+
<p>Authors who need more control over which characters are included in an initial letter, or who want to apply initial-letter formatting to replaced elements or multiple words can also apply the 'initial-letter' property to the first inline-level child of a block container.
152
128
129
+
<div class="example">
130
+
<pre>
131
+
<p>This paragraph has a dropped “T”.
132
+
<p><img alt="H" src="illuminated-h.svg">ere we have an illuminated “H”.
133
+
<p><span>Words may also</span> be given initial letter styling at the beginning of a paragraph.
134
+
</pre>
135
+
136
+
<pre>
137
+
::first-letter, /* style first paragraph's T */
138
+
img, /* style illuminated H */
139
+
span /* drop Words may also */
140
+
{ initial-letters: 2; }
141
+
</pre>
142
+
</div>
153
143
154
144
<h3 id="sizing-drop-initials">Creating Initial Letters: the 'initial-letter' property</h3>
155
145
@@ -276,13 +266,11 @@ span.initial {
276
266
277
267
</div>
278
268
269
+
If 'initial-letter' is applied to an image or other atomic element that does not provide the necessary alignment information, the alignment points for the image must be synthesized from the content edges.
279
270
280
-
<h4 id="initial-letter-replaced">Applying 'initial-letter' to replaced elements</h4>
281
-
282
-
'initial-letter' may be applied to an image or other replaced element, if it is the first child of the block container. In this case, the alignment points for the image would be the content edges.
271
+
Issue: Need to decide whether using margin edges or content edges for alignment. Writing Modes uses the margin edges for baseline alignment of replaced elements. There are cases for both content-alignment and margin-alignment for text. In both cases the margin box needs to be excluded.
283
272
284
273
285
-
<p class="issue">TK</p>
286
274
287
275
288
276
<h3 id="initial-letter-exclusions">Space Around Initial Letters</h3>
0 commit comments