Closed Bug 1708240 Opened 3 years ago Closed 9 months ago

[css-fonts-5] font-size-adjust: from-font

Categories

(Core :: Layout: Text and Fonts, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: mozilla-apprentice, Assigned: jfkthame)

References

Details

(Keywords: dev-doc-complete)

Attachments

(6 files)

A resolution was made for csswg-drafts/#5539.

[css-fonts-5] font-size-adjust: auto

  • RESOLVED: add from-font keyword to font-size-adjust

Discussion.

Type: defect → enhancement
Summary: [css-fonts-5] font-size-adjust: auto → [css-fonts-5] font-size-adjust: from-font

The Safari 17 beta now supports this.

And revert WPT metadata change from da1d83c060 as the font-size-adjust-013 test does not currently pass,
once all parts of the test are back within the reftest area.

(A recent change from Chrome increased the font size used in this test, but this made it start
unexpectedly "passing" for us because the last pair of test glyphs fell outside the reftest
captured area.)

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED

The spec says that from-font computes to a number based on the first available font,
so the currnet test is bogus.

https://drafts.csswg.org/css-fonts-5/#valdef-font-size-adjust-from-font

Depends on D182448

I don't think there's any reason to keep this pref around; let's just clean it up.

Depends on D182449

Attachment #9341685 - Attachment description: Bug 1708240 - Adjust margins in font-size-adjust-013 to avoid exceeding the valid test area. r=#style → Bug 1708240 - Adjust margins in font-size-adjust-012 and -013 to avoid exceeding the valid test area. r=#style
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/79c808970af5
Adjust margins in font-size-adjust-012 and -013 to avoid exceeding the valid test area. r=emilio
https://hg.mozilla.org/integration/autoland/rev/e766d2a9180e
Fix incorrect WPT expectations for computed value of font-size-adjust with from-font keyword. r=emilio
https://hg.mozilla.org/integration/autoland/rev/eac4b88ab28d
Remove the layout.css.font-size-adjust.basis.enabled pref, as this has been shipping by default for a couple years. r=emilio
https://hg.mozilla.org/integration/autoland/rev/e686e061b8b5
Implement the from-font keyword for CSS font-size-adjust. r=emilio
https://hg.mozilla.org/integration/autoland/rev/695203c0ff61
Add a WPT reftest to check that from-font is resolved using metrics of the current element's font, not the parent's. r=emilio

Ah - missed running mach devtools-css-db. :( Updated the patch.

Flags: needinfo?(jfkthame)
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4e53660f7575
Adjust margins in font-size-adjust-012 and -013 to avoid exceeding the valid test area. r=emilio
https://hg.mozilla.org/integration/autoland/rev/042666e7ff9e
Fix incorrect WPT expectations for computed value of font-size-adjust with from-font keyword. r=emilio
https://hg.mozilla.org/integration/autoland/rev/7e72f10cf94c
Remove the layout.css.font-size-adjust.basis.enabled pref, as this has been shipping by default for a couple years. r=emilio
https://hg.mozilla.org/integration/autoland/rev/4148a3755a1e
Implement the from-font keyword for CSS font-size-adjust. r=emilio,devtools-reviewers
https://hg.mozilla.org/integration/autoland/rev/8e6d6287c0af
Add a WPT reftest to check that from-font is resolved using metrics of the current element's font, not the parent's. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/41273 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Upstream PR was closed without merging

MDN doc updates for this feature can be tracked through this GitHub issue: https://github.com/mdn/content/issues/28842

Hello, I have a question - in Web Developer Tools, Styles inspector, the font-size-adjust property is missing ex-height in the list of values (as seen in Nightly 119). Is this intentional?

Flags: needinfo?(jfkthame)

Hmm -- I guess that's related to ex-height being the default metric, which can be omitted when specifying the value (so font-size-adjust: 0.5 means exactly the same as font-size-adjust: ex-height 0.5, and serialization will always omit it). But we should expose it in the list here anyhow, as it is valid syntax.

It looks to me like just adding an annotation here should fix this; I'll check in a local build.

Flags: needinfo?(jfkthame)
See Also: → 1852742

Thanks!

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

Attachment

General

Created:
Updated:
Size: