<?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>241475</bug_id>
          
          <creation_ts>2022-06-09 10:43:49 -0700</creation_ts>
          <short_desc>Allow keywords in CSS custom property fallback</short_desc>
          <delta_ts>2024-12-14 08:04:16 -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>CSS</component>
          <version>Safari 15</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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="Shaw Jia">xiaozj</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>chriskirknielsen+wkbugs</cc>
    
    <cc>koivisto</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1875043</commentid>
    <comment_count>0</comment_count>
    <who name="Shaw Jia">xiaozj</who>
    <bug_when>2022-06-09 10:43:49 -0700</bug_when>
    <thetext>Allow the use of keywords in custom property fallback.

One useful use case is to allow the use of &quot;revert&quot; to use user-agent stylesheet value as fallback.

Ex: * {display:var(--display,revert); --display:initial}

The example may seem redundant, but becomes useful with more complex logic such as responsive variants, modular scale for font sizes etc.

Firefox already supports this, Chrome is in the process of fixing it in https://bugs.chromium.org/p/chromium/issues/detail?id=1105782</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1875258</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-06-10 10:08:02 -0700</bug_when>
    <thetext>&lt;rdar://problem/94822036&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2066093</commentid>
    <comment_count>2</comment_count>
    <who name="Shaw Jia">xiaozj</who>
    <bug_when>2024-10-07 21:29:32 -0700</bug_when>
    <thetext>Any updates to this?

Safari is now the only browser that doesn&apos;t support keywords in CSS variable (custom property) fallback. Both Chrome and Firefox supports it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2081793</commentid>
    <comment_count>3</comment_count>
    <who name="Christopher Kirk-Nielsen">chriskirknielsen+wkbugs</who>
    <bug_when>2024-12-14 08:04:16 -0800</bug_when>
    <thetext>I believe I have run into the same issue and I&apos;m seeing the correct styles in Chrome and Firefox, but not Safari.
I have a reduced test case here which is manifested when toggling Dark Mode: https://codepen.io/chriskirknielsen/pen/emOBrvZ?editors=1100
Happy to create a new ticket if I&apos;m incorrect about this being the same bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>