<?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>279252</bug_id>
          
          <creation_ts>2024-09-06 02:02:38 -0700</creation_ts>
          <short_desc>Feature detection of starting styles doesn&apos;t work</short_desc>
          <delta_ts>2024-09-11 07:07:22 -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 Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>271040</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=279514</see_also>
          <bug_file_loc>https://codepen.io/bramus/pen/QWReXaW</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="Rogier de Ruijter">imbashenk</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>graouts</cc>
    
    <cc>karlcow</cc>
    
    <cc>koivisto</cc>
    
    <cc>nicole</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2058149</commentid>
    <comment_count>0</comment_count>
    <who name="Rogier de Ruijter">imbashenk</who>
    <bug_when>2024-09-06 02:02:38 -0700</bug_when>
    <thetext>Using the following method to detect if starting styles are available in the browser, does work in Chrome but doesn&apos;t work in Safari.

```
&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;

&lt;head&gt;
  &lt;meta charset=&quot;UTF-8&quot;&gt;
  &lt;title&gt;Page Title&lt;/title&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width,initial-scale=1&quot;&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;/body&gt;
&lt;style&gt;
  @property --supported {
    syntax: &quot;&lt;number&gt;&quot;;
    initial-value: 0;
    inherits: false;
  }

  :root {
    transition: --supported 0s calc(infinity * 1s);
  }

  @starting-style {
    :root {
      --supported: 1;
    }
  }

  body {
    background: red;
  }

  @container style(--supported: 1) {
    body {
      background: green;
    }
&lt;/style&gt;

&lt;/html&gt;

```

Live demo can be seen here: https://www.bram.us/2024/07/11/feature-detect-css-starting-style-support/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2058521</commentid>
    <comment_count>1</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-09-08 19:53:38 -0700</bug_when>
    <thetext>PASS Chrome
FAIL Safari, Firefox</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2058664</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-09-09 10:42:50 -0700</bug_when>
    <thetext>&lt;rdar://problem/135557879&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2058938</commentid>
    <comment_count>3</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-09-10 05:50:04 -0700</bug_when>
    <thetext>It seems like we&apos;re computing the wrong &quot;to&quot; value for the CSS Transition here, not picking up on the `--supported` initial value and using &quot;1&quot; for both &quot;from&quot; and &quot;to&quot;, unlike Chrome which goes from &quot;1&quot; to &quot;0&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2058955</commentid>
    <comment_count>4</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-09-10 06:40:39 -0700</bug_when>
    <thetext>Worth noting that &quot;getComputedStyle(document.body).getPropertyValue(&quot;--supported&quot;)&quot; returns &quot;0&quot;, so the transition seems to apply the same way in Chrome and Safari. I wonder if the bug here is about &quot;@container style(--supported: 1)&quot; not working as expected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2058960</commentid>
    <comment_count>5</comment_count>
      <attachid>472515</attachid>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-09-10 06:53:00 -0700</bug_when>
    <thetext>Created attachment 472515
Reduction without @starting-style

Attaching a test (custom-property-container-query.html) that removes @starting-style and CSS Transitions from the equation and only checks whether the container query works for the custom property and this test fails in Safari and Firefox but works in Chrome.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2059010</commentid>
    <comment_count>6</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2024-09-10 09:56:39 -0700</bug_when>
    <thetext>Looks like 271040

*** This bug has been marked as a duplicate of bug 271040 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2059027</commentid>
    <comment_count>7</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-09-10 10:41:59 -0700</bug_when>
    <thetext>I think there are additional issues at play on top of bug 271040, so re-opening to debug them first.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2059281</commentid>
    <comment_count>8</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2024-09-11 06:33:27 -0700</bug_when>
    <thetext>The original reported issue appears to be fixed with https://commits.webkit.org/283480@main. Lets dupe this one for clarity and file a separate bug for the getComputedStyle() issue mentioned above.

*** This bug has been marked as a duplicate of bug 271040 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2059287</commentid>
    <comment_count>9</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2024-09-11 07:07:15 -0700</bug_when>
    <thetext>I filed bug 279514 for the getKeyframes() / getComputedStyle() issue.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>472515</attachid>
            <date>2024-09-10 06:53:00 -0700</date>
            <delta_ts>2024-09-10 06:53:00 -0700</delta_ts>
            <desc>Reduction without @starting-style</desc>
            <filename>custom-property-container-query.html</filename>
            <type>text/html</type>
            <size>363</size>
            <attacher name="Antoine Quint">graouts</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KCjxoZWFkPgogIDxtZXRhIGNoYXJzZXQ9
IlVURi04Ij4KICA8dGl0bGU+UGFnZSBUaXRsZTwvdGl0bGU+CiAgPG1ldGEgbmFtZT0idmlld3Bv
cnQiIGNvbnRlbnQ9IndpZHRoPWRldmljZS13aWR0aCxpbml0aWFsLXNjYWxlPTEiPgo8L2hlYWQ+
Cgo8Ym9keT4KPC9ib2R5Pgo8c3R5bGU+CiAgOnJvb3QgewogICAgLS1zdXBwb3J0ZWQ6IDE7CiAg
fQoKICBib2R5IHsKICAgIGJhY2tncm91bmQ6IHJlZDsKICB9CgogIEBjb250YWluZXIgc3R5bGUo
LS1zdXBwb3J0ZWQ6IDEpIHsKICAgIGJvZHkgewogICAgICBiYWNrZ3JvdW5kOiBncmVlbjsKICAg
IH0KPC9zdHlsZT4KCjwvaHRtbD4K
</data>

          </attachment>
      

    </bug>

</bugzilla>