- From: fantasai via GitHub <sysbot+gh@w3.org>
- Date: Thu, 18 Jun 2020 05:35:06 +0000
- To: public-css-archive@w3.org
fantasai has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-inline-3] leading-trim through to descendant line boxes ==
The current definition of `leading-trim` relies on the concept of “first formatted line”. This was done for two reasons:
- it drills down through unstyled block boxes, which is helpful to the author and absolutely necessary given the way we generate anonymous block boxes
- it correctly aborts on nested formatting contexts, replaced elements, etc.
However, it might be a bit too aggressive. Consider
```
<section style="leading-trim: start">
<div class="warning" style="border: solid 10px; padding: 0.2em">...</div>
<p>Whatever normal paragraph.</p>
</section>
````
The .warning would probably be a bit surprised if the section trimmed its half-leading when it didn't request such trimming itself.
I think we might want to borrow the logic from margin collapsing, and not drill into boxes with non-zero padding/border. Whether or not the margins could have collapsed seems closely related to whether or not this block’s own content edge is adjacent to its descendant's first/last line box and therefore whether it should be controlling the leading on that line.
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5237 using your GitHub account
Received on Thursday, 18 June 2020 05:35:08 UTC