Re: [csswg-drafts] [CSS2] Clarify the relationship between anonymous block boxes and inline element boxes (#11324)

There seems to be a contradiction here. On one hand, it is stated that:

> "But only the ['line-height'](https://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#propdef-line-height) is used when calculating the height of the line box."

Yet on the other hand:

> "When [line-fit-edge](https://www.w3.org/TR/css-inline-3/#propdef-line-fit-edge) is not [leading](https://www.w3.org/TR/css-inline-3/#valdef-line-fit-edge-leading), the [layout bounds](https://www.w3.org/TR/css-inline-3/#layout-bounds) are inflated by the sum of the [margin](https://www.w3.org/TR/css-box-4/#margin), [border](https://www.w3.org/TR/css-box-4/#border), and [padding](https://www.w3.org/TR/css-box-4/#padding) on each side."

This seems inconsistent when considering the definition of layout bounds:

> "The contribution of an [inline box](https://www.w3.org/TR/css-display-3/#inline-box) to the [logical height](https://www.w3.org/TR/css-writing-modes-4/#logical-height) of its [line box](https://www.w3.org/TR/css-inline-3/#line-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 [line-fit-edge](https://www.w3.org/TR/css-inline-3/#propdef-line-fit-edge) and [line-height](https://www.w3.org/TR/css-inline-3/#propdef-line-height). The sizes and positions of child boxes do not influence its [layout bounds](https://www.w3.org/TR/css-inline-3/#layout-bounds) (nor its own logical height, for that matter, see [inline-sizing](https://www.w3.org/TR/css-inline-3/#propdef-inline-sizing))."

How can the layout bounds contribute to the height of the line box solely based on an inline box's `line-height` and yet be inflated by margin, border, and padding when `line-fit-edge` is not `leading`? If layout bounds are defined only by the text metrics of the inline box, how do padding/border/margin not directly affect the line box height?

-- 
GitHub Notification of comment by gitspeaks
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11324#issuecomment-2517551632 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 4 December 2024 14:13:52 UTC