The current definition of leading-trim
relies on the concept of “first formatted line”. This was done for two reasons:
However, it might be a bit too aggressive, as it also drills through styled block boxes. 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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3