[Webkit-unassigned] [Bug 160038] New: [Shadow DOM]: :host-context rule does not apply to matching nodes within the shadow root

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 21 12:06:37 PDT 2016


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

            Bug ID: 160038
           Summary: [Shadow DOM]: :host-context rule does not apply to
                    matching nodes within the shadow root
    Classification: Unclassified
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: cdata at google.com

Please consider the following test cases:

http://output.jsbin.com/menajes (Custom Elements & Shadow DOM)
http://output.jsbin.com/gafocub (Shadow DOM only)

The test cases feature two elements, each with a similar attached shadow root. The stylesheet within each shadow root contains a rule whose selector includes :host-context([dir="rtl"]).

What I expected to happen:

The contents in the second shadow root match the :host-context selector, causing text to be aligned to the right.

What actually happened:

The contents in the second shadow root is incorrectly aligned to the left.

The :host-context feature is extremely useful for navigating style encapsulation in some situations. As demonstrated in the test cases, it is probably the best way to conditionally style a shadow root's elements when RTL is set by some uncertain ancestor of the host.

-- 
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/20160721/13ab20c6/attachment.html>


More information about the webkit-unassigned mailing list