[Webkit-unassigned] [Bug 160538] New: Shadow DOM: #id::slotted() does not apply styles

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 3 20:57:45 PDT 2016


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

            Bug ID: 160538
           Summary: Shadow DOM: #id::slotted() does not apply styles
    Classification: Unclassified
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ericbidelman at chromium.org
                CC: cdumez at apple.com

Created attachment 285300
  --> https://bugs.webkit.org/attachment.cgi?id=285300&action=review
repro of #id::slotted not working

Prefixing `::slotted()` with an #id selector does apply the styling.

Repro: http://jsbin.com/qetofazevu/edit?html,output

  <nav>
    <span>Hello</span>
    <span>world</span>
  </nav>

  <template>
    <style>
      #s::slotted(*) {
        background: red;
      }
    </style>
    <slot id="s"></slot>
  </template>

  <script>
    var t = document.querySelector('template');
    t.content.cloneNode(true);
    var nav = document.querySelector('nav');
    nav.attachShadow({mode:'open'}).appendChild(t.content.cloneNode(true));
  </script>

Notes: 
- using `::slotted(*)` and `slot::slotted(*)` does apply the styling.
- repro works in Chrome 53+

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160804/d0861338/attachment.html>


More information about the webkit-unassigned mailing list