| Summary: | text-box-trim leading radically different results from Figma | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | mic.gallego | ||||
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | ahmad.saleem792, fantasai.bugs, mmaxfield, simon.fraser, webkit-bug-importer, zalan | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Safari Technology Preview | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
mic.gallego
2023-09-05 00:50:54 PDT
If you want to trim to the cap height on the top and alphabetic baseline on the bottom, you need to specify those metrics. Trimming to the cap height and alphabetic baseline only works in some writing systems--it works fine for English, for example, but not for Chinese. So the default behavior doesn't cut into the space reserved by the font, it only removes the half-leading added by 'line-height'. The spec for text-box-trim is here, btw: https://www.w3.org/TR/css-inline-3/ If Figma is defaulting to the cap height and alphabetic baseline, then it's not following the spec. |