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

Support stylesheets in element templates #146

Closed
sorvell opened this issue May 20, 2013 · 5 comments
Closed

Support stylesheets in element templates #146

sorvell opened this issue May 20, 2013 · 5 comments
Assignees

Comments

@sorvell
Copy link
Contributor

sorvell commented May 20, 2013

We currently process link rel="stylesheet" in an element tag but not inside an element's template. We should process both of these the same way.

@ghost ghost assigned sorvell May 20, 2013
@sorvell
Copy link
Contributor Author

sorvell commented May 20, 2013

Currently, we're relying on HTMLImports to load stylesheet content. HTMLImports does not load content inside of templates.

Therefore to support this enhancement, we either need to change HTMLImports or we need a separate css loader.

Another alternative would be to remove support for loading styles in custom elements via elements and instead always use @import. The @import syntax is already necessary for non-cors resources.

@sorvell
Copy link
Contributor Author

sorvell commented May 20, 2013

Unfortunately, if we use @import, we lose the ability to process rules in the stylesheet. We'd need a custom css loader for this.

@ghost ghost assigned sjmiles May 20, 2013
@ebidel
Copy link
Contributor

ebidel commented May 31, 2013

+1

@sjmiles
Copy link
Contributor

sjmiles commented Jun 12, 2013

In 8df92bfcb989560bae9a5b4c909ed115e0acbbe6, groundwork was performed in HTMLImports so that linked stylesheets are loaded for parsing.

@sorvell
Copy link
Contributor Author

sorvell commented Sep 25, 2013

This has been supported for awhile now so closing this outdated issue.

@sorvell sorvell closed this as completed Sep 25, 2013
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