[Webkit-unassigned] [Bug 222733] New: The :host() function pseudo-class should accept a single <compound-selector> only

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 4 05:04:55 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=222733

            Bug ID: 222733
           Summary: The :host() function pseudo-class should accept a
                    single <compound-selector> only
           Product: WebKit
           Version: Safari 13
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: andruud at chromium.org

It appears that Webkit currently accepts a <compound-selector-list> parse-time (but then it doesn't fully work at selector-matching-time)?

In any case, the correct grammar is now: :host( <compound-selector> )

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

Test:

<!DOCTYPE html>
<template id=template>
  <style>
    :host(#host1) slot { color: green; }
    :host(#host2, #host3) slot { color: green; }
  </style>
  <slot></slot>
</template>
<div id=host1><span>Should be green</span></div>
<div id=host2><span>Should not be green</span></div>
<div id=host3><span>Should not be green</span></div>
<script>
  host1.attachShadow({mode:'open'}).append(template.content.cloneNode(true));
  host2.attachShadow({mode:'open'}).append(template.content.cloneNode(true));
  host3.attachShadow({mode:'open'}).append(template.content.cloneNode(true));
</script>

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210304/d3b19787/attachment.htm>


More information about the webkit-unassigned mailing list