Skip to content

Custom pseudo-elements cannot be targeted outside shadow dom #475

Closed
@peterhorne

Description

The following test case creates a custom element which renders Hello, <span pseduo="x-name">Polymer</span>. I'm trying to target the custom pseudo-element x-name using the CSS selector span::x-name in the parent document but it doesn't result in a match.

I've tested the following in Chrome 34 & 36.

<!doctype html>
<html>
    <head>
        <script src="bower_components/platform/platform.js"></script>

        <style type="text/css">
            span::x-name {
                color: green;
            }
        </style>
    </head>

    <body>
        <link rel="import" href="/bower_components/polymer/polymer.html">
        <polymer-element name="my-example">
            <template>
                Hello, <span pseudo="x-name">Polymer</span>
            </template>

            <script>
                Polymer('my-example', {
                    ready: function() {}
                })
            </script>
        </polymer-element>

        <my-example></my-example>
    </body>
</html>

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions