Open fantasai opened 6 years ago
I'm writing this only with half-baked understanding, so there might be some incorrect parts, please read with that understanding.
After I heard a proposal from @fantasai about leading-over/-under
, I'm thinking the relationship between it and line-box-contain
. As far as I understand, the current scope of leading-over/-under
is only for the first and the last line box, but if we apply that to all line boxes, it can also solve the baseline jitter problem, as far as line-height
is set to a fixed value, am I correct?
@kojiishi No, because leading-over/under gets rid of the leading. In general you want leading between lines. :) We just need to make sure the contents of the line don't contribute excess space to the line box, and that the baseline is consistently positioned within that space.
Some old discussions: dbaron's line-box-contain proposal and Hyatt's proposal to www-style
Thanks, right, I think I understand it better. And the proposal looks good to me.
The CSS Working Group just discussed Draft line-box-contain proposal
.
The CSS Working Group just discussed Proposal for a better line sizing model
.
Note: There were some interesting comments related to this from dbaron in https://lists.w3.org/Archives/Public/www-style/2020Feb/0020.html
Agenda+ to decide whether to publish with the previously-drafted text or not. (I don't think it's good, it's just a starting point.) https://drafts.csswg.org/css-inline-3/#line-sizing-property
The CSS Working Group just discussed Draft line-box-contain proposal
, and agreed to the following:
RESOLVED: Publish css-inline
@dbaron had a proposal called
line-box-contain
for controlling how line box heights are calculated. Some aspects of this feature probably need to be revived if we're going to have baseline-to-baseline distances that aren't wiggly in simple cases like a single-font-size paragraph mixing proportional and monospace text.Proposed values need to include:
line-height
values on anything other than the root inline box (slightly more conservative approach than dbaron's proposal to only use the root inline) so that the line box only grows if its contents actually extend outside the outer leading edges of the root inline