Skip to content
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

[css-shadow-parts] Dynamic *exportparts=* #3509

Closed
frivoal opened this issue Jan 14, 2019 · 2 comments
Closed

[css-shadow-parts] Dynamic *exportparts=* #3509

frivoal opened this issue Jan 14, 2019 · 2 comments

Comments

@frivoal
Copy link
Collaborator

frivoal commented Jan 14, 2019

(Split from issue #3467, reported by @stefsullrew)

Would it be possible to dynamically set the value of exportparts=?
The below example show some pseudo-code to illustrate the question.

<x-foo>
    <h1>Component headline</h1>
    
    <template for:each={items} for:item="item" for:index="idx">
        <x-item exportparts="item-header: foo-item-header-{idx}"></x-item>
    </template>
</x-foo>
@fergald
Copy link
Contributor

fergald commented Jan 15, 2019

@stefsullrew If you had a template system like the above, I don't see why it wouldn't work for exportparts but this seems more like a request for a template system than a feature for ::part, unless I have missed something. E.g. https://github.com/w3c/webcomponents/blob/gh-pages/proposals/Template-Instantiation.md

@fergald
Copy link
Contributor

fergald commented Jan 21, 2019

I'm closing this issue because I think what you want is already supported, at least from the ::part side of things. There's no native templating in HTML yet but exportparts="item-header: foo-item-header-{idx}" should work fine right now with any of the existing template engines.

Please reopen if I have misunderstood the request.

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

2 participants