diff --git a/css-inline-3/Overview.bs b/css-inline-3/Overview.bs index dc76d592245..843a5169693 100644 --- a/css-inline-3/Overview.bs +++ b/css-inline-3/Overview.bs @@ -176,9 +176,9 @@ Layout of Line Boxes The [=logical height=] of a [=line box=] is fitted to its contents once they have been [[#alignment|block-axis aligned]]. - This fit is controlled by 'line-height' and 'text-edge'. + This fit is controlled by 'line-height' and 'text-box-edge'. The first/last line boxes in a [=block container=] may additionally - be trimmed by 'leading-trim'. + be trimmed by 'text-box-trim'.
this is their [=margin box=].
  • For the [=root inline box=], - and for [=inline boxes=] with ''text-edge: leading'': + and for [=inline boxes=] with ''text-box-edge: leading'': this derived from their used 'line-height', ignoring any [=margin=]/[=border=]/[=padding=]; see [[#inline-height]].
  • For other [=inline boxes=]: - this is derived from their 'text-edge' metrics, + this is derived from their 'text-box-edge' metrics, and includes any [=margin=]/[=border=]/[=padding=]; see [[#inline-height]] @@ -266,7 +266,7 @@ Layout Within Line Boxes are ignored, for example, for: * margin collapsing * finding the [=first formatted line=] - * applying 'leading-trim' + * applying 'text-box-trim' * [[css-break-4#break-propagation|fragmentation break propagation]] @@ -363,7 +363,7 @@ Baselines and Metrics such as alignment, box sizing, and initial letter layout. Issue: The CSSWG would like to know which baseline values are necessary - for each property that uses them ('dominant-baseline', 'alignment-baseline', 'text-edge', 'initial-letter-align'): + for each property that uses them ('dominant-baseline', 'alignment-baseline', 'text-box-edge', 'initial-letter-align'): if any can be dropped, or any need to be added. See Issue 859. @@ -957,7 +957,7 @@ Logical Heights and Inter-line Spacing The [=block-axis=] sizing of a [=line box=] depends on the sizes and [[#alignment|alignment]] of its [=inline-level=] contents. This sizing is controlled by - the 'line-height', 'text-edge', 'leading-trim', and 'inline-sizing' properties. + the 'line-height', 'text-box-edge', 'text-box-trim', and 'inline-sizing' properties.

    Line Spacing: the 'line-height' property

    @@ -1035,7 +1035,7 @@ Line Spacing: the 'line-height' property See also Issue 3118 and Issue 2165. - Note: When 'text-edge' is ''text-edge/leading'', + Note: When 'text-box-edge' is ''text-box-edge/leading'', the margins, borders, and padding of [=inline boxes=] do not affect the line box’s height calculation. However, they are still rendered around these boxes. @@ -1045,10 +1045,10 @@ Line Spacing: the 'line-height' property potentially obscuring earlier content.

    -Inline Box Edge Metrics: the 'text-edge' property

    +Inline Box Edge Metrics: the 'text-box-edge' property
    -	Name: text-edge
    +	Name: text-box-edge
     	Value: leading | [ text | cap | ex | ideographic | ideographic-ink ] [ text | alphabetic | ideographic | ideographic-ink ]?
     	Initial: leading
     	Applies to: [=inline boxes=]
    @@ -1066,23 +1066,23 @@ Inline Box Edge Metrics: the 'text-edge' property
     
     	[=Inline boxes=], whose primary purpose is to contain text,
     	are sized in the [=block axis=] based on their font metrics.
    -	The 'text-edge' property controls which metrics are used.
    +	The 'text-box-edge' property controls which metrics are used.
     
     	The chosen metrics are used as the basis
     	for the [=layout bounds=] of the [=inline box=]
     	(if it is not the [=root inline box=]).
    -	The 'leading-trim' property can be used in conjunction
    +	The 'text-box-trim' property can be used in conjunction
     	to match the [=content edges=] to these same metrics.
     
     	The first value specifies the text [=over=] edge;
     	the second value specifies the text [=under=] edge.
     	If only one value is specified,
     	both edges are assigned that same keyword if possible;
    -	else ''text-edge/text'' is assumed as the missing value.
    +	else ''text-box-edge/text'' is assumed as the missing value.
     
     	ISSUE(5236): Do we need [=longhands=] or is this shorthand enough?
     
    -	Note: The ''text-edge/leading'' and ''text-edge/text'' values
    +	Note: The ''text-box-edge/leading'' and ''text-box-edge/text'' values
     	rely on the font [=ascent=] and [=descent=] to make sure the text fits.
     	Other values are more likely to result in overlap or overflow
     	caused by ascents above the specified metrics
    @@ -1092,7 +1092,7 @@ Inline Box Edge Metrics: the 'text-edge' property
     
     	Values have the following meanings:
     
    -	
    +
    leading
    Use the [=ascent=]/[=descent=] plus any positive [=half-leading=]. @@ -1124,32 +1124,32 @@ Inline Box Edge Metrics: the 'text-edge' property Use the [=alphabetic baseline=].
    - Unless 'text-edge' is ''text-edge/leading''-- + Unless 'text-box-edge' is ''text-box-edge/leading''-- in which case the box’s own 'line-height' is used to add spacing-- the box’s margin, padding, and border also contribute to the [=layout bounds=]. - Note: Although only ''text-edge/leading'' applies positive [=half-leading=], + Note: Although only ''text-box-edge/leading'' applies positive [=half-leading=], in order to allow text to be set tightly, all values apply negative [=half-leading=], see [[#inline-height]]. Half-leading is applied equally to both sides of the text; for more precise overlap control authors can use - ''text-edge: text'' together with negative [=margins=] + ''text-box-edge: text'' together with negative [=margins=] on the affected text.
    - three different values of the text-edge property. + three different values of the text-box-edge property.
    - The 'text-edge' property, showing values for ''text-edge/leading'', - ''text-edge/cap'', and ''text-edge/ex''. + The 'text-box-edge' property, showing values for ''text-box-edge/leading'', + ''text-box-edge/cap'', and ''text-box-edge/ex''. The red lines indicate the layout bounds of the inline box.
    -

    When 'text-edge' is ''text-edge/leading'', +

    When 'text-box-edge' is ''text-box-edge/leading'', vertical rhythm can be broken any time there is a change in font metrics or vertical alignment within a paragraph. @@ -1169,7 +1169,7 @@ Calculating the Logical Height Contributions (“Layout Bounds”) of Inline Box here referred to as its layout bounds, is always calculated with respect to its own text metrics, as described below, - and is controlled by 'text-edge' and 'line-height'. + and is controlled by 'text-box-edge' and 'line-height'. The sizes and positions of child boxes do not influence its [=layout bounds=] (nor its own [=logical height=], for that matter, @@ -1191,13 +1191,13 @@ Calculating the Logical Height Contributions (“Layout Bounds”) of Inline Box For each glyph (including the “strut”), A represents its ascent above the [=baseline=]; D represents its descent below. - Unless 'text-edge' specifies a different metric to use, + Unless 'text-box-edge' specifies a different metric to use, A refers to the [=ascent metric=] (for the given font at its given size) and D to the [=descent metric=], each adjusted to account for the [=dominant baseline=]’s offset from zero. If 'line-height' computes to ''line-height/normal'' - and either 'text-edge' is ''text-edge/leading'' + and either 'text-box-edge' is ''text-box-edge/leading'' or this is the [=root inline box=], the font’s [=line gap metric=] may also be incorporated into A and D @@ -1225,7 +1225,7 @@ Calculating the Logical Height Contributions (“Layout Bounds”) of Inline Box giving an effective ascent above the baseline of A′ = A + L/2, and an effective descent of D′ = D + L/2. - However, if 'text-edge' is not ''text-edge/leading'' + However, if 'text-box-edge' is not ''text-box-edge/leading'' and this is not the [=root inline box=], if the [=half-leading=] is positive, treat it as zero. The [=layout bounds=] exactly encloses @@ -1234,7 +1234,7 @@ Calculating the Logical Height Contributions (“Layout Bounds”) of Inline Box Note: L may be negative. Additionally, - when 'text-edge' is not ''text-edge/leading'', + when 'text-box-edge' is not ''text-box-edge/leading'', the [=layout bounds=] are inflated by the sum of the [=margin=], [=border=], and [=padding=] on each side. @@ -1246,7 +1246,7 @@ Calculating the Logical Height Contributions (“Layout Bounds”) of Inline Box is ignored when sizing the line box.

    -Half-Leading Control: the 'leading-trim' property

    +Half-Leading Control: the 'text-box-trim' property To ensure consistent spacing in the basic case of running text, CSS line layout introduces leading both above and below @@ -1260,7 +1260,7 @@ Half-Leading Control: the 'leading-trim' property However, all this extra spacing interferes with visual alignment and with control over effective (visually-apparent) spacing. - The 'leading-trim' property allows trimming + The 'text-box-trim' property allows trimming this additional space above and below the first and last lines of a block, allowing more precise control over spacing around the glyphs. @@ -1279,7 +1279,7 @@ Half-Leading Control: the 'leading-trim' property this often doesn't yield the intended visual effect.
    - Consider some Latin text placed to the right of an image,
 			          to be centered between its top and bottom.
 			          Measuring from the top of the image to the top of the text box yields 13px;
@@ -1300,7 +1300,7 @@ Half-Leading Control: the 'leading-trim' property</h3>
 		respectively.
 
 		<figure>
-			<img src= visually centers the text.
    - By using 'leading-trim' to strip out the spacing above the cap height + By using 'text-box-trim' to strip out the spacing above the cap height and below the alphabetic baseline, centering the box actually centers the text; and does so reliably, regardless of what font is used to render it.
    -
    Even though different fonts have different cap heights, @@ -1329,9 +1329,9 @@ Half-Leading Control: the 'leading-trim' property
    -	Name: leading-trim
    -	Value: normal | start | end | both
    -	Initial: normal
    +	Name: text-box-trim
    +	Value: none | start | end | both
    +	Initial: none
     	Applies to: block containers and [=inline boxes=]
     	Inherited: no
     	Percentages: N/A
    @@ -1350,7 +1350,7 @@ Half-Leading Control: the 'leading-trim' property
     
     	On [=inline boxes=],
     	specifies whether to trim the [=content box=]
    -	to match its corresponding 'text-edge' metric.
    +	to match its corresponding 'text-box-edge' metric.
     
     	ISSUE: Should inline boxes automatically do this?
     	And/or is it better for line sizing and content-box sizing to be separably controlled?
    @@ -1358,19 +1358,19 @@ Half-Leading Control: the 'leading-trim' property
     	On [=block containers=],
     	specifies whether to trim [=half-leading=]
     	at the start/end of its content
    -	to the corresponding 'text-edge' metric
    +	to the corresponding 'text-box-edge' metric
     	to better match the box’s [=content edge=] to its text content.
     
     	Note: Content and ink overflowing a box
    -	due to non-initial values of 'leading-trim'
    +	due to non-initial values of 'text-box-trim'
     	is handled the same as content that would overflow the box or line box otherwise.
     
    -	This property has no effect when 'text-edge' is ''text-edge/leading''.
    +	This property has no effect when 'text-box-edge' is ''text-box-edge/leading''.
     
     	Values have the following meanings:
     
    -	
    -
    normal +
    +
    none
    No special handling of the first/last [=line box=] when applied to a [=block container=]. @@ -1378,40 +1378,40 @@ Half-Leading Control: the 'leading-trim' property When applied to an [=inline box=], specifies that the over/under [=content edges=] coincide with the [=text-over=]/[=text-under=] baselines - regardless of 'text-edge' + regardless of 'text-box-edge' (which nonetheless still affects [=line box=] sizing).
    start
    For [=block containers=]: trim the [=block-start=] side of the first formatted line - to the corresponding 'text-edge' metric of its [=root inline box=]. + to the corresponding 'text-box-edge' metric of its [=root inline box=]. If there is no such line, or if there is intervening non-zero padding or borders, there is no effect. For [=inline boxes=]: trims the [=block-start=] side of the box - to match its [=content edge=] to the metric specified by 'text-edge' - (treating ''text-edge/leading'' as ''text-edge/text''). + to match its [=content edge=] to the metric specified by 'text-box-edge' + (treating ''text-box-edge/leading'' as ''text-box-edge/text'').
    end
    For [=block containers=]: trim the [=block-end=] side of the last formatted line - to the corresponding 'text-edge' metric of its [=root inline box=]. + to the corresponding 'text-box-edge' metric of its [=root inline box=]. If there is no such line, or if there is intervening non-zero padding or borders, there is no effect. For [=inline boxes=]: trims the [=block-end=] side of the box - to match its [=content edge=] to the metric specified by 'text-edge' - (treating ''text-edge/leading'' as ''text-edge/text''). + to match its [=content edge=] to the metric specified by 'text-box-edge' + (treating ''text-box-edge/leading'' as ''text-box-edge/text'').
    both
    - Specifies the behavior of ''leading-trim/start'' and ''leading-trim/end'' + Specifies the behavior of ''text-box-trim/start'' and ''text-box-trim/end'' simultaneously.
    @@ -2007,7 +2007,7 @@ Properties Applying to Initial Letters All properties that apply to an inline box also apply to an inline initial letter except for 'vertical-align' and its sub-properties, - 'font-size', 'line-height', 'text-edge', and 'inline-sizing'. + 'font-size', 'line-height', 'text-box-edge', and 'inline-sizing'. @@ -2978,7 +2978,10 @@ Changes Changes since the 14 November 2022 Working Draft:
      -
    • Require UAs to floor the [=line gap metric=] at zero. +
    • Renamed text-edge to 'text-box-edge' and leading-trim to 'text-box-trim', + and also renamed their initial values. + (Issue 8067) +
    • Floor the [=line gap metric=] at zero. (Issue 5064)
    @@ -3000,7 +3003,7 @@ Changes See Indic Layout Requirements. (Issue 864) -
  • Make non-zero padding and border block effects of 'leading-trim' from ancestors. +
  • Make non-zero padding and border block effects of leading-trim from ancestors. (Issue 5237)
  • Remove ''hebrew'' value from 'initial-letter-align'. @@ -3035,8 +3038,8 @@ Changes
    • - Reworked the relationship of the earlier line-sizing and leading-trim proposals - to create 'text-edge' and a differently-structured 'leading-trim'. + Reworked the relationship of the earlier line-sizing and text-box-trim proposals + to create text-edge and a differently-structured leading-trim. (Issue 5168)
    • @@ -3045,7 +3048,7 @@ Changes (Issue 5180)
    • - Integrated 'text-edge' into [[#inline-height|line box height calculations]]. + Integrated text-edge into [[#inline-height|line box height calculations]].
    • Refactored definitions of various baselines into [[#css-metrics|their own section]] @@ -3086,7 +3089,7 @@ Changes is used for alignment. (Issue 861)
    • - Added 'leading-trim' proposal to control the metrics used for the + Added leading-trim proposal to control the metrics used for the line-over/line-under edge in line box layout. (Issue 3240 and 3955) @@ -3106,7 +3109,7 @@ Changes Clarified interpretation of ''vertical-align/middle'', ''vertical-align/text-top'', and ''vertical-align/text-bottom'' in [=vertical writing modes=]. (Issue 4495)
    • - Clarified that ''vertical-align/text-top''/''vertical-align/text-bottom''/''leading-trim/text'' values should be consistently interpreted across 'vertical-align', 'dominant-baseline', 'leading-trim', and drawing the content box of an inline box. + Clarified that ''vertical-align/text-top''/''vertical-align/text-bottom''/''text-box-trim/text'' values should be consistently interpreted across 'vertical-align', 'dominant-baseline', leading-trim, and drawing the content box of an inline box. (Issue 3978)
    • Corrected initial value of 'dominant-baseline' to ''dominant-baseline/auto''.