Closed Bug 1797146 Opened 2 years ago Closed 2 years ago

Unexpected spaces in serialization of `font-variant` when a system font name is used

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

Details

Attachments

(2 files, 1 obsolete file)

Using a new about:blank window,

> var s = document.body.style
< CSS2Properties(0)
> s.font = "menu"
< "menu"
> s.fontVariant
< "     "

expected: "", got: "     "

> s.fontVariantNumeric = "tabular-nums"
< "tabular-nums"
> s.fontVariant
< "    tabular-nums "

expected: "tabular-nums", got: "    tabular-nums "

> s.fontVariantCaps = "small-caps"
< "small-caps"
> s.fontVariant
< "small-caps    tabular-nums "

expected: "small-caps tabular-nums", got "small-caps    tabular-nums "

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED

We don't use them1, and these are generally not properties that
authors would be able to set via the font shorthand anyways.

Let's simplify the code. This fixes the font-variant bug and also
unblocks further clean-ups of these properties in the future.

Attachment #9299975 - Attachment is obsolete: true
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/276b26a8ddb0
Remove system font support for various font longhands. r=jfkthame
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/69dc8f8cf2e5
Add a WPT test for serialization of font-variant. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/36671 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: