<?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>154669</bug_id>
          
          <creation_ts>2016-02-24 23:39:28 -0800</creation_ts>
          <short_desc>CSS.supports returns false for custom properties</short_desc>
          <delta_ts>2022-08-01 09:10:28 -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>All</rep_platform>
          <op_sys>OS X 10.11</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>https://drafts.csswg.org/css-conditional-3/#the-css-interface</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="yisibl">50167214</reporter>
          <assigned_to name="Ryosuke Niwa">rniwa</assigned_to>
          <cc>50167214</cc>
    
    <cc>abecsi</cc>
    
    <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>betravis</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>claude.pache</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>davidbarr</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>dino</cc>
    
    <cc>hyatt</cc>
    
    <cc>jonlee</cc>
    
    <cc>kling</cc>
    
    <cc>pf</cc>
    
    <cc>rniwa</cc>
    
    <cc>sgospodarets</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1168042</commentid>
    <comment_count>0</comment_count>
    <who name="yisibl">50167214</who>
    <bug_when>2016-02-24 23:39:28 -0800</bug_when>
    <thetext>1. Run CSS.supports(&apos;--foo&apos;, &apos;red&apos;) on the JavaScript console

What is the expected result?
true getting logged in the console

What happens instead?
false getting logged in the console

As custom properties (aka CSS variables) are now supported in Chromium, CSS.supports(&apos;--foo&apos;, &apos;red&apos;) should return true.
The alternative method signature using a conditionText works already correct and returns true for CSS.supports(&apos;(--foo: red)&apos;)

The related specification can be found here: 
https://drafts.csswg.org/css-conditional-3/#the-css-interface

See also: https://crbug.com/584683(Blink fixed)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1221423</commentid>
    <comment_count>1</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2016-08-19 12:15:05 -0700</bug_when>
    <thetext>https://twitter.com/traviskaufman/status/766672149566423040</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1299936</commentid>
    <comment_count>2</comment_count>
    <who name="Serg Hospodarets">sgospodarets</who>
    <bug_when>2017-04-21 15:21:16 -0700</bug_when>
    <thetext>Visual Demo- https://codepen.io/malyw/pen/OmXMYb</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1299952</commentid>
    <comment_count>3</comment_count>
    <who name="Serg Hospodarets">sgospodarets</who>
    <bug_when>2017-04-21 15:47:00 -0700</bug_when>
    <thetext>The problem is, that this bug breaks most of the CSS Custom Properties detection examples across the Web.
And introduces inconsistencies and confusion as it works in CSS, but not in JS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1300035</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-04-21 17:54:26 -0700</bug_when>
    <thetext>&lt;rdar://problem/31770186&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887846</commentid>
    <comment_count>5</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-07-30 06:39:24 -0700</bug_when>
    <thetext>I am able to reproduce this bug using test case from Comment 02 and Safari 15.6 on macOS 12.5 shows &quot;FALSE&quot; for &quot;window.CSS.supports(&apos;--a&apos;, 0);&quot; while all other browsers (Chrome Canary 106 and Firefox Nightly 105) show &quot;TRUE&quot;. Just wanted to share updated test results. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887925</commentid>
    <comment_count>6</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-07-30 23:01:12 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/2881</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887992</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-07-31 15:53:13 -0700</bug_when>
    <thetext>Committed 252987@main (69362356a5ab): &lt;https://commits.webkit.org/252987@main&gt;

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

    </bug>

</bugzilla>