[css-inline-3] Add `hanging` value to `text-box-edge`
css-inline-3Agenda+
I think a `hanging` value for `text-box-edge` would be useful, as in some fonts, the `cap` and `text` baselines don't suffice to trim to the hanging line. For example, when trimming the "Shurjo" font on [this Bengali news site](https://www.prothomalo.com/) with `text-box-trim`, I get the following results on Chrome and Safari (as well as Firefox with my WIP `text-box-trim` implementation). The `text` edge still has leading space, and the `cap` edge is significantly lower than the hanging line.
<blockquote>
<img width="991" height="197" alt="Image" src="https://github.com/user-attachments/assets/057d6218-3557-49cd-bfd3-5626edba78cd" />
</td>
<td>
<img width="650" height="261" alt="Image" src="https://github.com/user-attachments/assets/54192c4a-a072-4e7b-87b4-ebb3feb49e7c" />
</blockquote>
---
I prototyped adding the `hanging` edge to my Firefox WIP implementation (using the same `hanging` baseline as the `alignment-baseline` definition) and it's much better:
<blockquote>
<img width="473" height="198" alt="Image" src="https://github.com/user-attachments/assets/1a09c79b-ba1d-4ef5-8ab8-bf00f21d9e62" />
<img width="649" height="261" alt="Image" src="https://github.com/user-attachments/assets/fe298c86-a317-4180-802d-6e94454214dc" />
</blockquote>
3 条评论