Rename font-stretch to font-width, and make the old property name an alias
Categories
(Core :: Layout: Text and Fonts, enhancement)
Tracking
()
People
(Reporter: onkarruikar, Assigned: descalante)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete, parity-safari, web-feature)
User Story
web-feature: font-width
Attachments
(2 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
Bug 1911075 - Rename font-stretch to font-width, and make the old property name an alias. r=jfkthame
48 bytes,
text/x-phabricator-request
|
Details | Review |
Steps to reproduce:
- Try to set
font-width: expandedon any HTML element.
Browser version: Firfox nightly 130.0a1 (2024-07-31) (64-bit)
Actual results:
The browser didn't recognize the property name.
Expected results:
The browser should recognize font-width as font-stretch. And font-stretch to continue as a legacy alias.
The font-stretch property has been renamed to font-width in the specification. And font-stretch is now a legacy alias:
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Layout: Text and Fonts' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•2 years ago
|
||
It looks like we haven't implemented the spec resolution in https://github.com/w3c/csswg-drafts/issues/551#issuecomment-1885196273
This might be simple to do. A first step would be updating this code to font-width, and rename related structs. Then add aliases="font-stretch"?
Comment 3•2 years ago
|
||
Yeah, this should be a fairly simple change, I expect -- basically a big search-and-replace, plus the aliasing.
One thing to note is that the change applies to both the property and the separate but related @font-face descriptor. We should make sure to update (and alias) both of these at the same time, to avoid creating extra confusion.
Comment 4•2 years ago
|
||
One related factor that I don't think has been discussed yet is the Canvas2D API, which also uses the unfortunate stretch-based naming.
We should probably try to get a width alias added there as well, for consistency.
Also, if suitable, it would be great if a warning is logged in console logs or shown in the Developer tools->Elements->styles tab when the old font-stretch name is used.
Comment 6•2 years ago
|
||
Comment 7•2 years ago
|
||
Attaching a WIP patch that covers much of the global replacement of the "stretch" term with "width"; this builds for me on macOS, but there will no doubt be some residual issues in the other platform back-ends still to be fixed up.
(This does not yet include any aliasing of the old name to the new, which will be required for this to go forward.)
Updated•3 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 8•2 months ago
|
||
Updated•1 month ago
|
Comment 10•1 month ago
|
||
Comment 11•1 month ago
•
|
||
Reverted this because it was causing mochitests failures in test_animation-type-longhand.html.
- Revert link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | devtools/server/tests/chrome/test_animation-type-longhand.html | font-stretch is an unseen longhand property
Please also check these mochitests-plain failures.
P.S. These wpt failures also.
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/61487 for changes under testing/web-platform/tests
Upstream PR was closed without merging
| Assignee | ||
Comment 14•1 month ago
|
||
[:SerbanS] Thank you for the heads up, the latest patch should fix those failures :)
Comment 15•1 month ago
|
||
Comment 16•1 month ago
|
||
Comment 17•1 month ago
|
||
Revert for causing wr failures on font-face-width-descriptor-aliasing.html.
Upstream PR was closed without merging
Comment 19•1 month ago
|
||
Comment 20•1 month ago
|
||
| bugherder | ||
| Assignee | ||
Updated•1 month ago
|
Upstream PR merged by moz-wptsync-bot
Comment 22•1 month ago
|
||
Bug was resolved, but the web-feature font-width (definition file) is not yet marked as supported in Firefox.
Feature bugs are usually automatically closed once the corresponding web-features are marked as supported; this typically happens after the feature reaches release.
Updated•1 month ago
|
Comment 23•24 days ago
•
|
||
Added to the Fx155 relnotes. Would have added it sooner but comment 22 caused this bug to go by unnoticed in the places we try to identify possible release note candidates.
Description
•