Open Bug 1816038 Opened 3 years ago Updated 8 days ago

[css-inline-3] Implement `text-box-trim` (formerly `leading-trim`)

Categories

(Core :: CSS Parsing and Computation, enhancement)

Firefox 111
enhancement

Tracking

()

People

(Reporter: 709922234, Unassigned)

References

(Depends on 4 open bugs, Blocks 5 open bugs, )

Details

(Keywords: parity-chrome, parity-safari, web-feature, Whiteboard: [platform-feature][webcompat:risk-low])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/111.0

Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core
Blocks: css-inline-3

This property has been renamed to text-box-trim and the spec has been updated.
https://github.com/w3c/csswg-drafts/issues/8067#issuecomment-1493065304

(The anchor link in the spec is still #leading-trim, presumably so that old links continue to work. :) I'm updating the URL to point at the editor's draft so that we've got the latest notes there.)

Also: it looks like some WPT tests were added recently here:
https://github.com/web-platform-tests/wpt/pull/39535
https://github.com/web-platform-tests/wpt/pull/39706

Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Implement `leading-trim` → [css-inline-3] Implement `text-box-trim` (formerly `leading-trim`)
Duplicate of this bug: 1896329
Depends on: 1898137
Blocks: 1898352
Blocks: 1898714
Depends on: 1900005
Blocks: 1914226
Blocks: 1913521
Blocks: 1913230
Blocks: 1913057
Blocks: 1913045
Depends on: 1917053
Depends on: 1916294
Depends on: 1931625
Depends on: 1932849

Firefox is a bit left behind - any ETA for this feature?

User Story: (updated)
Whiteboard: [platform-feature][webcompat:risk-low]

Just want to advocate for prioritizing this. It is baseline on Chrome and Safari. Would greatly improve UX and make the web more beautiful for all 🀩

Just want to advocate for prioritizing this.

Staff, correct me if I am wrong, but I guess that's the purpose of the "Vote" button here, right? Is it still relevant? (I see none of the "pingers" here actually used it at this point.)

Welcome to Bugzilla, Michael, by the way! πŸ‘‹

(In reply to Michal Čaplygin [:myf] from comment #5)

Just want to advocate for prioritizing this.

Staff, correct me if I am wrong, but I guess that's the purpose of the "Vote" button here, right? Is it still relevant? (I see none of the "pingers" here actually used it at this point.)

Welcome to Bugzilla, Michael, by the way! πŸ‘‹

Ahhhhh sorry this is new for me. I'll vote.

FYI, this can solve the annoying vertical alignment issue for Segoe UI, the system font of Windows. See https://gitlab.com/gitlab-org/gitlab/-/work_items/16789, https://bugs.openjdk.org/browse/JDK-8115125 for details.

Basically, when you want to vertically align the text in UI elements, such as a button, Segoe UI always feels a bit off. This is because has a very large top half leading compared to its bottom half leading, so the letters appear not centered but a little bit downwards in the text box. The font is intentionally designed this way so that tall letters such as vietnamese letters will never be clipped.

To make Segoe UI visually centered in the Y axis, one can use text-box-edge: cap alphabetic; text-box-trim: trim-both;. This way, the top and bottom half leading are both removed. The result in chrome is shown in the screenshot. Left is Segoe UI with the css tweak, middle is Segoe UI without css tweak, right is Gitlab Sans without css tweak.

Blocks: 2043012
Depends on: 2048425
Depends on: 2048426
Depends on: 2048427
Depends on: 2048428
Depends on: 2048827
Depends on: 2049484
Depends on: 2050138
Depends on: 2050141
Depends on: 2050326
Depends on: 2052589
No longer blocks: 1898352
Depends on: 1898352
No longer blocks: 1898714
Depends on: 1898714
Depends on: 2055372
Depends on: 2063495
Depends on: 2063835
Depends on: 2063909
Depends on: 2064596
User Story: (updated)
See Also: → 2068630
Depends on: 2068667
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: