[csswg-drafts] [css-inline] Leading control at start/end of block

fantasai has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-inline] Leading control at start/end of block ==
Need to add some kind of control over leading at the start/end of a container. See discussion at
* https://lists.w3.org/Archives/Public/www-style/2016May/0090.html
* https://lists.w3.org/Archives/Public/www-archive/2018Oct/0003.html
* https://lists.w3.org/Archives/Public/www-archive/2018Oct/0004.html
* https://lists.w3.org/Archives/Public/www-archive/2018Oct/att-0009/00-part

The use case is actual control over the amount of space between the content edge and the text, both to be able to control spacing more exactly and to be able to line the top/bottom of the text up with the top/bottom edge of a colored block or image.

<img src="https://lists.w3.org/Archives/Public/www-archive/2018Oct/att-0007/dokegjpcjjmjonee.png">

<img src="https://lists.w3.org/Archives/Public/www-archive/2018Oct/att-0007/cgikdonhiondpafc.png">

Based on Jan Nicklas’s examples (see above), it seems the control needs to be able to choose font-based top and bottom metrics to use, e.g. leading-top/ascent-top/cap-height/hanging/ideographic-top/hebrew-top/etc for the top, leading-bottom/descent-bottom/alphabetic/ideographic-bottom/etc. for the bottom so that it's possible to line up text with adjacent images, etc. and to more meaningfully control spacing between the visible text and its container's edge.

<img src="https://lists.w3.org/Archives/Public/www-archive/2018Oct/att-0007/CSS_Rhythmic_Sizing.jpg">

It could look something like

```
leading-trim-over: normal | text | cap | ex | ideographic | etc.
leading-trim-under: normal | text | alphabetic | ideographic | etc.
leading-trim: <'leading-trim-over'> <'leading-trim-under'>?
```


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3240 using your GitHub account

Received on Tuesday, 23 October 2018 14:08:34 UTC