Bug 245033

Summary: [css-values-4] Implement font-relative cap/rcap CSS units
Product: WebKit Reporter: Roman Komarov <kizmarh>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: karlcow, mmaxfield, ntim, webkit-bug-importer
Priority: P2 Keywords: BrowserCompat, InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

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 ***