<?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>267046</bug_id>
          
          <creation_ts>2024-01-03 08:51:47 -0800</creation_ts>
          <short_desc>REGRESSION (Safari 17): Named at-rule container skipped when container named in a :host selector</short_desc>
          <delta_ts>2024-02-02 22:48:37 -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 17</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>macOS 14</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=267793</see_also>
    
    <see_also>https://github.com/web-platform-tests/wpt/pull/44383</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>268683</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Egor Kloos">studio</reporter>
          <assigned_to name="Antti Koivisto">koivisto</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>karlcow</cc>
    
    <cc>kizmarh</cc>
    
    <cc>koivisto</cc>
    
    <cc>mail</cc>
    
    <cc>ntim</cc>
    
    <cc>seemann</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2002784</commentid>
    <comment_count>0</comment_count>
    <who name="Egor Kloos">studio</who>
    <bug_when>2024-01-03 08:51:47 -0800</bug_when>
    <thetext>When a container-name property is added to a `:host` selector, the @container using that name will be skipped. 

A named @container in Safari 17 fails:
`@container hello (width &gt; 400px) {}`

A @container without a name in Safari 17 works:
`@container (width &gt; 400px) {}`

Note that this bug doesn&apos;t occur on Safari 16.

Moving the container-name property to an element inside the Shadow DOM does work. 

Example(s) on Codepen:
https://codepen.io/dutchcelt/pen/oNVbXPd</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2002800</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-01-03 10:41:23 -0800</bug_when>
    <thetext>&lt;rdar://problem/120428386&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2002805</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2024-01-03 11:00:07 -0800</bug_when>
    <thetext>It is broken on WebKit ToT (272613@main) where &apos;Hello World&apos; is different compared to Firefox Nightly 123 and Chrome Canary 122.

Adding &apos;BrowserCompat&apos; as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2003371</commentid>
    <comment_count>3</comment_count>
    <who name="Semmel">seemann</who>
    <bug_when>2024-01-06 07:20:31 -0800</bug_when>
    <thetext>It had worked up to (including) Safari 17.1.
It broke on iOS with Safari 17.2-beta+1 (iOS 17.2 Seed 1 (21C5029g)).

I&apos;ve filed a feedback in November &apos;23 which has been unnoticed up to now. https://feedbackassistant.apple.com/feedback/13348441</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2010064</commentid>
    <comment_count>4</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2024-02-02 04:27:11 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/23738</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2010084</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-02-02 07:09:33 -0800</bug_when>
    <thetext>Committed 273987@main (14e1048a543f): &lt;https://commits.webkit.org/273987@main&gt;

Reviewed commits have been landed. Closing PR #23738 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2010085</commentid>
    <comment_count>6</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2024-02-02 07:18:42 -0800</bug_when>
    <thetext>Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/44383</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2010330</commentid>
    <comment_count>7</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2024-02-02 22:48:20 -0800</bug_when>
    <thetext>This fix did not fix the ::slotted case that was also demonstrated by the original test case. Filed https://bugs.webkit.org/show_bug.cgi?id=268683 for that.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>