Skip to content

Pseudo elements like ::part and ::theme #725

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
anpfeiffer opened this issue Jul 8, 2019 · 2 comments
Closed

Pseudo elements like ::part and ::theme #725

anpfeiffer opened this issue Jul 8, 2019 · 2 comments

Comments

@anpfeiffer
Copy link

Hi, is there a chance that the pseudo elements ::part and ::theme work in all browser?

It works for Chrome and opera but not in Firefox or Edge.

Thank you

@sorvell
Copy link
Member

sorvell commented Jul 9, 2019

There is a branch with some experimental work here that we did awhile back. We're not super happy with the performance impact of this approach and we're not sure right now if/when/how we're going to carry this forward.

One thing we think definitely makes sense and can be implemented with minimal performance impact is to use part attributes in an element's DOM and then have a system that can inject stylesheets into elements that target (only) these parts. This approach is not strictly a polyfill for ::part but it is inspired by and compatible with it and gives some of the same functionality. There's an example in that same branch here. Hope that helps.

@justinfagnani
Copy link
Contributor

Let's track this in webcomponents/polyfills#252

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants