Closed Bug 1310170 Opened 8 years ago Closed 7 months ago

Implement 'lh' and 'rlh' units

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
relnote-firefox --- 120+
firefox120 --- fixed

People

(Reporter: sebo, Assigned: dshin)

References

()

Details

(5 keywords)

Attachments

(3 files)

CSS Values and Units 3 defines[1] lh and rlh units that refer to the computed line height of the element it is applied to resp. the root element.

Sebastian

[1] https://drafts.csswg.org/css-values-3/#font-relative-lengths (actually, will define, see https://github.com/w3c/csswg-drafts/pull/602)
Priority: -- → P3

Test results


https://wpt.fyi/results/css/css-values?label=master

So far, no browser pass these 3 tests.

Correspondent WebKit bug report:
https://bugs.webkit.org/show_bug.cgi?id=195180

Type: defect → enhancement

Safari Technology Preview supported

FWIW, there's a textarea-auto-sizing proposal in https://github.com/w3c/csswg-drafts/issues/7542 that potentially depends on the "lh" unit being implemented.

Severity: normal → S3

FWIW, Blink is planning to ship support for lh units (followed later by rlh units), per https://github.com/mozilla/standards-positions/issues/699#issue-1411609731

Depends on: 1802523

Feature is now rolled out to chromium browsers with 109
https://caniuse.com/mdn-css_types_length_lh

Depends on: 1814626
Assignee: nobody → dshin
Status: NEW → ASSIGNED
Depends on: 1853206
Depends on: 1855730
Attachment #9352735 - Attachment description: Bug 1310170: Implement `lh` and `rlh` length units. r=#layout-reviewers → Bug 1310170: Part 2 - Implement `lh` and `rlh` length units. r=#layout-reviewers
Pushed by dshin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bd895d264c21
Part 1 - Separate out writing-mode check for text being vertical. r=emilio
https://hg.mozilla.org/integration/autoland/rev/66d921932ca7
Part 2 - Implement `lh` and `rlh` length units. r=emilio
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/143214321c60
Annotate another test as passing.
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
Keywords: dev-doc-needed
No longer depends on: 1802523
Duplicate of this bug: 1802523

Release Note Request
[Why is this notable]: lh and rlh units will be parsed and computed correctly as lengths, starting in Nightly 120-
[Affects Firefox for Android]: Yes
[Suggested wording]: lh and rlh units let authors specify lengths in terms of the element's (Or the root element's) line height.
[Links (documentation, blog post, etc)]: MDN

relnote-firefox: --- → ?

(In reply to Pulsebot from comment #12)

Pushed by dshin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bd895d264c21
Part 1 - Separate out writing-mode check for text being vertical. r=emilio
https://hg.mozilla.org/integration/autoland/rev/66d921932ca7
Part 2 - Implement lh and rlh length units. r=emilio

== Change summary for alert #39828 (as of Fri, 06 Oct 2023 08:58:01 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
5% startup_about_home_paint_cached windows10-64-shippable-qr e10s fission stylo webrender-sw 598.92 -> 568.25
4% startup_about_home_paint_cached windows10-64-shippable-qr e10s fission stylo webrender 633.19 -> 608.17
4% startup_about_home_paint_cached windows10-64-shippable-qr e10s fission stylo webrender 635.96 -> 610.83
4% startup_about_home_paint_cached windows10-64-shippable-qr e10s fission stylo webrender 632.50 -> 608.33

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=39828

Documentation changes for this can be tracked in this GitHub issue.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: