Bug 245033 - [css-values-4] Implement font-relative cap/rcap CSS units
Summary: [css-values-4] Implement font-relative cap/rcap CSS units
Status: RESOLVED DUPLICATE of bug 242466
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2022-09-10 12:03 PDT by Roman Komarov
Modified: 2023-08-24 00:43 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Komarov 2022-09-10 12:03:19 PDT
Link to the spec for the `cap` unit: https://www.w3.org/TR/css-values-4/#cap (was proposed in 2016, added to specs in 2017 — https://github.com/w3c/csswg-drafts/issues/660)

Firefox already supports it (end of 2021, https://bugzilla.mozilla.org/show_bug.cgi?id=1702924), and it would be really nice if Webkit would start supporting it as well.

Having more font-relative units would be really nice — for some calculations they might be crucial.

Example demo which uses `cap` unit — https://codepen.io/kizu/pen/dyeXPJP?editors=1100

Above is the version without a fallback, here is a link to a version with a fallback, using a CSS variable of 1.4ex when `cap` is not supported: https://codepen.io/kizu/pen/wvjWvZG?editors=1100 — it can be used as an approximation of how it should look, or alternatively you can check out the first link in Firefox.
Comment 1 Roman Komarov 2022-09-10 12:16:09 PDT
Would also like to cross-link a ticket for Chromium — https://bugs.chromium.org/p/chromium/issues/detail?id=1201220 (opened for over a year, no progress yet)
Comment 2 Radar WebKit Bug Importer 2022-09-16 16:36:35 PDT
<rdar://problem/100049503>
Comment 4 Tim Nguyen (:ntim) 2023-08-24 00:43:24 PDT

*** This bug has been marked as a duplicate of bug 242466 ***