TakayoshiKochi / deprecate-style-in-html-imports

Deprecating/Removing <style> application from HTML Imports
https://takayoshikochi.github.io/deprecate-style-in-html-imports/
47 stars 44 forks source link

Still issue of styling master document from stylesheet using html imports is persisting #2

Closed gauravonly closed 6 years ago

gauravonly commented 6 years ago

I have followed as it was instructed but still i am getting the same error. Any know how about the issue will help a lot???

TakayoshiKochi commented 6 years ago

Do you use HTML Imports with Polymer or do you directly use HTML Imports?

infiman commented 6 years ago

@TakayoshiKochi as I've understood from examples, none of these fixes are removing initial loading/applying of styles when the import is resolved. All these fixes are just for the sake of styles duplication in masters head either by loading (<link>) or "styling" (<style>), right? Correct me if I'm wrong.

Also, I'm curious how removing "style-in-html-imports" feature in Chrome will affect all unfixed imports? Will it not import/apply styles at all?

I've tried to apply these fixes to some external styles. And I'm getting multiple imports of same CSS resource (from index.html and import.html), what is not really good.

  1. Structure: image
  2. Network: image
TakayoshiKochi commented 6 years ago

Sorry for the delay in responding. So the problem of still getting the warning is, e.g.

main.html

<link rel="import" href="import.html">
...

import.html

<style>
div { color: green; }
...
</style>

and if any workarounds, such as using JavaScript code to move the