<?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>222733</bug_id>
          
          <creation_ts>2021-03-04 05:04:55 -0800</creation_ts>
          <short_desc>The :host() function pseudo-class should only accept a single compound-selector</short_desc>
          <delta_ts>2023-08-07 15:29: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 13</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>
          
          <blocked>148695</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Anders Hartvoll Ruud">andruud</reporter>
          <assigned_to name="Ryosuke Niwa">rniwa</assigned_to>
          <cc>emilio</cc>
    
    <cc>koivisto</cc>
    
    <cc>nlawson</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1735785</commentid>
    <comment_count>0</comment_count>
    <who name="Anders Hartvoll Ruud">andruud</who>
    <bug_when>2021-03-04 05:04:55 -0800</bug_when>
    <thetext>It appears that Webkit currently accepts a &lt;compound-selector-list&gt; parse-time (but then it doesn&apos;t fully work at selector-matching-time)?

In any case, the correct grammar is now: :host( &lt;compound-selector&gt; )

https://drafts.csswg.org/css-scoping/#selectordef-host

Test:

&lt;!DOCTYPE html&gt;
&lt;template id=template&gt;
  &lt;style&gt;
    :host(#host1) slot { color: green; }
    :host(#host2, #host3) slot { color: green; }
  &lt;/style&gt;
  &lt;slot&gt;&lt;/slot&gt;
&lt;/template&gt;
&lt;div id=host1&gt;&lt;span&gt;Should be green&lt;/span&gt;&lt;/div&gt;
&lt;div id=host2&gt;&lt;span&gt;Should not be green&lt;/span&gt;&lt;/div&gt;
&lt;div id=host3&gt;&lt;span&gt;Should not be green&lt;/span&gt;&lt;/div&gt;
&lt;script&gt;
  host1.attachShadow({mode:&apos;open&apos;}).append(template.content.cloneNode(true));
  host2.attachShadow({mode:&apos;open&apos;}).append(template.content.cloneNode(true));
  host3.attachShadow({mode:&apos;open&apos;}).append(template.content.cloneNode(true));
&lt;/script&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1738423</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-03-11 05:05:15 -0800</bug_when>
    <thetext>&lt;rdar://problem/75311716&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1880436</commentid>
    <comment_count>2</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-07-03 16:31:08 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/2045</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1880469</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-07-03 22:29:48 -0700</bug_when>
    <thetext>Committed 252110@main (e91f2366aef4): &lt;https://commits.webkit.org/252110@main&gt;

Reviewed commits have been landed. Closing PR #2045 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1969980</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2023-08-07 15:29:23 -0700</bug_when>
    <thetext>*** Bug 249420 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>