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

[ShadyCSS] Expose prepareTemplate for non template DocumentFragments #26

Open
tomalec opened this issue Jan 10, 2018 · 3 comments
Open

Comments

@tomalec
Copy link
Contributor

tomalec commented Jan 10, 2018

As briefly suggested at README.md#usage, to support VanillaJS elements I need to use ShadyCSS API manually.

  1. First, call ShadyCSS.prepareTemplate(template, name) on a <template> element that will be imported into a shadowRoot

The problem is, I usually don't use a <template> to create shadowRoot (see https://github.com/webcomponents/shadycss/issues/144). Creating HTMLTemplateElement for every single string or DocumentFragment I want to put into my Shadow, seems like an overhead.

Could ShadyCSS expose a method to process DocumentFragment or string? Like StyleTransformer ;)

@haugthom
Copy link

+1

1 similar comment
@immersiontravis
Copy link

+1

@dfreedm dfreedm transferred this issue from webcomponents/shadycss Jun 7, 2019
@dfreedm dfreedm changed the title Expose prepareTemplate for non template DocumentFragments [ShadyCSS] Expose prepareTemplate for non template DocumentFragments Jun 12, 2019
dfreedm pushed a commit that referenced this issue Jun 12, 2019
@dfreedm dfreedm added Severity: Medium Type: Feature New feature or request labels Jun 13, 2019
@stale
Copy link

stale bot commented Apr 22, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 22, 2021
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

5 participants