<?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>262762</bug_id>
          
          <creation_ts>2023-10-05 22:22:20 -0700</creation_ts>
          <short_desc>Implement percentage values for letter-spacing and word-spacing [css-text-4]</short_desc>
          <delta_ts>2024-03-01 06:46:07 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Text</component>
          <version>Safari 17</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=270347</see_also>
    
    <see_also>https://github.com/web-platform-tests/wpt/pull/44882</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="fantasai">fantasai.bugs</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>1983107</commentid>
    <comment_count>0</comment_count>
    <who name="fantasai">fantasai.bugs</who>
    <bug_when>2023-10-05 22:22:20 -0700</bug_when>
    <thetext>Background:
  CSS Text Level 4 &lt;https://www.w3.org/TR/css-text-4/&gt; adds support for percentage values of word-spacing and letter-spacing. These inherit as percentages, so that they are always relative to the currently-effective font-size.

Current Status:
  WebKit has support for percentage values of word-spacing (but not calc() values) but calculates them against the width of a space instead of the font-size, and doesn&apos;t inherit them properly; and has no support for percentage letter-spacing.

Proposal:
  Re-implement percentage values of word-spacing per spec, add support for percentage values of letter-spacing, and implement support for calc().

Compat Risks:
  Firefox also implements percentage word-spacing in a similar way to WebKit, but Chrome doesn&apos;t implement percentage word-spacing, so it&apos;s unlikely that Web content depends on it. There could be some lock-in in single-engine environments, but because the current implementation doesn&apos;t implement inheritance properly, the benefit of using % over fixed values is not fully realized in the current implementation, so the incentive to use them over &apos;em&apos; values (which have existed since CSS1) is limited.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1983109</commentid>
    <comment_count>1</comment_count>
    <who name="fantasai">fantasai.bugs</who>
    <bug_when>2023-10-05 22:27:09 -0700</bug_when>
    <thetext>rdar://114538918</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1983111</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-10-05 22:27:54 -0700</bug_when>
    <thetext>&lt;rdar://problem/116562262&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1983480</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2023-10-07 13:46:26 -0700</bug_when>
    <thetext>rdar://114538918</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1986783</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2023-10-22 23:58:49 -0700</bug_when>
    <thetext>https://github.com/WebKit/WebKit/pull/18771/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1995996</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-11-30 13:52:32 -0800</bug_when>
    <thetext>Committed 271357@main (6abbfb00701a): &lt;https://commits.webkit.org/271357@main&gt;

Reviewed commits have been landed. Closing PR #18771 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>