<?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>279740</bug_id>
          
          <creation_ts>2024-09-15 14:07:38 -0700</creation_ts>
          <short_desc>&quot;inherit&quot; as variable substitution fallback not working when setting custom property</short_desc>
          <delta_ts>2025-07-02 11:31:23 -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>Safari 17</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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="Jeffery To">jeffery.to</reporter>
          <assigned_to name="Antti Koivisto">koivisto</assigned_to>
          <cc>koivisto</cc>
    
    <cc>m_dubet</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2060340</commentid>
    <comment_count>0</comment_count>
      <attachid>472568</attachid>
    <who name="Jeffery To">jeffery.to</who>
    <bug_when>2024-09-15 14:07:38 -0700</bug_when>
    <thetext>Created attachment 472568
Test case

When a custom property is set like:

    --color: var(--unknown, inherit);

the custom property does not inherit the correct value.


Steps to reproduce:
1. Open attached test case.

Expected result:
A 10px green border is shown.

Actual result:
A 10px border with the default colour is shown.

Tested with:
* Safari 17.6 (19618.3.11.11.5) on macOS Sonoma 14.6.1 (MacBook Pro 16-inch, M3 Max)
* Safari on iOS 17.6.1 (iPhone 15)
* Safari on iPadOS 17.6.1 (iPad Pro 13-inch, M4)
* Epiphany 46.0 on Ubuntu 24.04 (libwebkitgtk 2.44.3)

Works on Chrome and Firefox.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2062212</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-09-22 14:08:23 -0700</bug_when>
    <thetext>&lt;rdar://problem/136463977&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2127316</commentid>
    <comment_count>2</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2025-07-02 09:46:58 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/47490</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2127345</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-07-02 11:31:21 -0700</bug_when>
    <thetext>Committed 296918@main (ca01e51f3120): &lt;https://commits.webkit.org/296918@main&gt;

Reviewed commits have been landed. Closing PR #47490 and removing active labels.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>472568</attachid>
            <date>2024-09-15 14:07:38 -0700</date>
            <delta_ts>2024-09-15 14:07:38 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>testcase.html</filename>
            <type>text/html</type>
            <size>539</size>
            <attacher name="Jeffery To">jeffery.to</attacher>
            
              <data encoding="base64">PCFkb2N0eXBlIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KCTxtZXRhIGNoYXJzZXQ9InV0Zi04Ij4N
Cgk8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNlLXdpZHRoLCBpbml0
aWFsLXNjYWxlPTEiPg0KCTx0aXRsZT4iaW5oZXJpdCIgYXMgdmFyaWFibGUgc3Vic3RpdHV0aW9u
IGZhbGxiYWNrIG5vdCB3b3JraW5nIHdoZW4gc2V0dGluZyBjdXN0b20gcHJvcGVydHk8L3RpdGxl
Pg0KCTxzdHlsZT4NCgkJLyogU2hvdWxkIHNlZSBhIDEwcHggZ3JlZW4gYm9yZGVyICovDQoJCSNv
dXRlciB7DQoJCQktLWNvbG9yOiBncmVlbjsNCgkJfQ0KCQkjaW5uZXIgew0KCQkJLS1jb2xvcjog
dmFyKC0tdW5rbm93biwgaW5oZXJpdCk7DQoJCQljb2xvcjogdmFyKC0tY29sb3IpOw0KCQkJYm9y
ZGVyLXN0eWxlOiBzb2xpZDsNCgkJCWJvcmRlci13aWR0aDogMTBweDsNCgkJfQ0KCTwvc3R5bGU+
DQo8L2hlYWQ+DQo8Ym9keT4NCjxkaXYgaWQ9Im91dGVyIj48ZGl2IGlkPSJpbm5lciI+PC9kaXY+
PC9kaXY+DQo8L2JvZHk+DQo8L2h0bWw+DQo=
</data>

          </attachment>
      

    </bug>

</bugzilla>