<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>245033</bug_id>
          
          <creation_ts>2022-09-10 12:03:19 -0700</creation_ts>
          <short_desc>[css-values-4] Implement font-relative cap/rcap CSS units</short_desc>
          <delta_ts>2023-08-24 00:43:24 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>242466</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Roman Komarov">kizmarh</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>karlcow</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>ntim</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1897564</commentid>
    <comment_count>0</comment_count>
    <who name="Roman Komarov">kizmarh</who>
    <bug_when>2022-09-10 12:03:19 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1897568</commentid>
    <comment_count>1</comment_count>
    <who name="Roman Komarov">kizmarh</who>
    <bug_when>2022-09-10 12:16:09 -0700</bug_when>
    <thetext>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)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1899122</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-09-16 16:36:35 -0700</bug_when>
    <thetext>&lt;rdar://problem/100049503&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1899123</commentid>
    <comment_count>3</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2022-09-16 16:43:56 -0700</bug_when>
    <thetext>Test at https://wpt.fyi/results/css/css-values/cap-unit-001.html?label=master&amp;label=experimental&amp;aligned&amp;view=subtest&amp;q=%2Fcss-values%2Fcap-unit-001.html

maybe missing test for rcap</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1973208</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2023-08-24 00:43:24 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 242466 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>