Skip to content

Commit c0bec28

Browse files
committed
[css-inline-3] Actually define behavior on inline boxes. #3955
1 parent 232c069 commit c0bec28

File tree

1 file changed

+52
-48
lines changed

1 file changed

+52
-48
lines changed

css-inline-3/Overview.bs

+52-48
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ Line Sizing Containment: the 'line-sizing' property</h3>
710710
or "don't pay attention to me".
711711

712712
<h3 id="leading-trim-property">
713-
Leading Control: the 'leading-trim-over' and 'leading-trim-under' properties and 'leading-trim' shorthand</h3>
713+
Leading Control</h3>
714714

715715
ISSUE: This is a rough draft of a proposal,
716716
and is likely to change significantly
@@ -803,6 +803,9 @@ Leading Control: the 'leading-trim-over' and 'leading-trim-under' properties and
803803
</figure>
804804
</div>
805805

806+
<h4 id="leading-trim-over">
807+
Trimming Spacing Above: the 'leading-trim-over' property</h4>
808+
806809
<pre class="propdef">
807810
Name: leading-trim-over
808811
Value: normal | text | cap | ex | ideographic | ideographic-ink
@@ -813,58 +816,57 @@ Leading Control: the 'leading-trim-over' and 'leading-trim-under' properties and
813816
Computed value: the specified keyword
814817
</pre>
815818

816-
The 'leading-trim-over' property trims
819+
On [=block containers=],
820+
the 'leading-trim-over' property trims
817821
the <a>line-over</a> side of the first line box in the block container
818-
to better match the box’s content edge to its text content.
822+
to the specified metric of its [=root inline box=]
823+
to better match the box’s [=content edge=] to its text content.
819824
The property affects only the <a>first formatted line</a> of the block container;
820825
if there is no such line, it has no effect.
826+
827+
On [=inline boxes=],
828+
it trims the [=line-over=] side of the box,
829+
matching its [=content edge=] to the specified metric.
830+
821831
Values have the following meanings:
822832

823833
<dl dfn-for="leading-trim-over, leading-trim" dfn-type=value>
824834
<dt><dfn>normal</dfn>
825835
<dd>
826-
Half-leading is applied over the first line,
827-
just as for every other line.
836+
Half-leading is applied over the first line of the [=block container=],
837+
just as for every other line
838+
and no trimming occurs.
839+
(When applied to [=block containers=],
840+
all other values trim this half-leading.)
828841

829842
<dt><dfn>text</dfn>
830843
<dd>
831-
Half-leading is not applied over the first line;
832-
the top of the line box is set to
833-
the text-top metric
844+
Trim to the text-top metric
834845
(the metric used for ''vertical-align: text-top''
835846
and the [=line-over=] [=content edge=]
836-
as defined in [[CSS2]])
837-
of the root inline box.
847+
as defined in [[CSS2]]).
838848

839849
<dt><dfn>cap</dfn>
840850
<dd>
841-
Half-leading is not applied over the first line;
842-
the top of the line box is set to
843-
the cap-height metric
844-
of the root inline box.
851+
Trim to the cap-height metric.
845852

846853
<dt><dfn>ex</dfn>
847854
<dd>
848-
Half-leading is not applied over the first line;
849-
the top of the line box is set to
850-
the ex-height metric
851-
of the root inline box.
855+
Trim to the ex-height metric.
852856

853857
<dt><dfn>ideographic</dfn>
854858
<dd>
855-
Half-leading is not applied over the first line;
856-
the top of the line box is set to
857-
the ideographic top (<code>idtp</code>) metric
858-
of the root inline box.
859+
Trim to the ideographic top (<code>idtp</code>) metric.
859860

860861
<dt><dfn>ideographic-ink</dfn>
861862
<dd>
862-
Half-leading is not applied over the first line;
863-
the top of the line box is set to
864-
the ideographic character face top (<code>icft</code>) metric
865-
of the root inline box.
863+
Trim to the ideographic character face top (<code>icft</code>) metric.
866864
</dl>
867865

866+
867+
<h4 id="leading-trim-under">
868+
Trimming Spacing Below: the 'leading-trim-under' property</h4>
869+
868870
<pre class="propdef">
869871
Name: leading-trim-under
870872
Value: normal | text | alphabetic | ideographic | ideographic-ink
@@ -875,51 +877,53 @@ Leading Control: the 'leading-trim-over' and 'leading-trim-under' properties and
875877
Computed value: the specified keyword
876878
</pre>
877879

878-
The 'leading-trim-over' property trims
880+
On [=block containers=],
881+
the 'leading-trim-over' property trims
879882
the <a>line-over</a> side of the first line box in the block container
880-
to better match the box’s content edge to its text content.
881-
The property affects only the <a>first formatted line</a> of the block container;
883+
to the specified metric of its [=root inline box=]
884+
to better match the box’s [=content edge=] to its text content.
885+
The property affects only the last formatted line of the block container;
882886
if there is no such line, it has no effect.
887+
888+
On [=inline boxes=],
889+
it trims the [=line-under=] side of the box,
890+
matching its [=content edge=] to the specified metric.
891+
883892
Values have the following meanings:
884893

885894
<dl dfn-for="leading-trim-under" dfn-type=value>
886895
<dt><dfn>normal</dfn>
887896
<dd>
888-
Half-leading is applied over the first line,
889-
just as for every other line.
897+
Half-leading is applied under the last line of the [=block container=],
898+
just as for every other line
899+
and no trimming occurs.
900+
(When applied to [=block containers=],
901+
all other values trim this half-leading.)
890902

891903
<dt><dfn>text</dfn>
892904
<dd>
893-
Half-leading is not applied over the first line;
894-
the top of the line box is set to
895-
the text-bottom metric
905+
Trim to the text-bottom metric
896906
(the metric used for ''vertical-align: text-bottom''
897907
and the [=line-under=] [=content edge=]
898-
as defined in [[CSS2]])
899-
of the root inline box.
908+
as defined in [[CSS2]]).
900909

901910
<dt><dfn>alphabetic</dfn>
902911
<dd>
903-
Half-leading is not applied over the first line;
904-
the top of the line box is set to
905-
the alphabetic baseline metric
906-
of the root inline box.
912+
Trim to the alphabetic baseline metric.
907913

908914
<dt><dfn>ideographic</dfn>
909915
<dd>
910-
Half-leading is not applied over the first line;
911-
the top of the line box is set to
912-
the ideographic bottom (<code>ideo</code>) metric
913-
of the root inline box.
916+
Trim to the ideographic bottom (<code>ideo</code>) metric.
914917

915918
<dt><dfn>ideographic-ink</dfn>
916919
<dd>
917-
Half-leading is not applied over the first line;
918-
the top of the line box is set to
919-
the ideographic character face top (<code>icfb</code>) metric
920-
of the root inline box.
920+
Trim to the ideographic character face top (<code>icfb</code>) metric.
921921
</dl>
922922

923+
924+
<h4 id="leading-trim-over">
925+
Trimming Spacing Above and Below: the 'leading-trim' shorthand</h4>
926+
923927
<pre class="propdef">
924928
Name: leading-trim
925929
Value: normal | text | cap | ex | ideographic | ideographic-ink

0 commit comments

Comments
 (0)