-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Update custom-style
to hoist styles to main document
#4679
Comments
custom-style
to hoist styles to main document
Looking forward to an example of system wide styles for theming. Will it still be possible to include styles via |
=>
So if I understand correctly, this warning will be solved automatically when you release a new version of <custom-style>? |
Thanks for the ping! I'll try to get this out the door by next week. |
Work around deprecation of styles in HTML Imports https://crbug.com/523952 Fixes #4679
Work around deprecation of styles in HTML Imports https://crbug.com/523952 Backport from 155ab8a for 2.x Related to #4679
So 1.10.1 just got released but im still seeing this warning all over. Would be so much better if had some idea what files were causing this. Seeing it on my demo pages, with the iron-demo-helpers components. Need to see if its our code or not too. Im seeing this warning when i use iron-icon in elements too Its also hard to tell if this deprecation is a breaking change, or if the behaviour will fall back to the polyfill? |
@sorvell 2.1.1 also still shows the warning. It might be nice to know what this fix does and does not do in regards to "fixing" the depreciation warning. |
@ggriffithsIDBS @moderndeveloperllc The deprecation notice mentions that Now, as for the logging of the warning, I don't think there's much I can do. The styles should move when they boot, but this is likely after the browser check for styles in HTML Import documents occurs, meaning that there's not much I can do about it. Using |
Or @azakus could just answer the question right here 😀. |
@azakus I think that vulcanizing or using polymer-build will only remove the warning if the imports in question are bundled into the main document, which is not always the case. (In the case of polymer build, for example, they'd typically be bundled into either the app shell bundle or a fragment bundle, and still imported as part of an HTML import.) |
I switched to "Polymer/polymer#^1.10.1" and still get the "[Deprecation] Styling master document from stylesheets defined in HTML Imports is deprecated ..." warning. If this is caused by a webcomponent, how do I find out which one it is? I've updated them all to the latest version on their 1.X branches, moving to polymer 2.X is next but needs more work. |
Yes, you're going to get that for now because the deprecation notice happens right after parsing of the page, before the custom style can upgrade and move into the main document. We're working on some things we could do with the polymer CLI to remove the deprecation notice, but that work is still ongoing. |
Reason why is there is an upcoming breaking change in chrome which will break things to do with styles. I've created this fix I967aa12a7ead22650940caf66bb4fa61256992ac But [1] recommends us be on polymer 1.10.1+. It includes this fix [2]. [1] https://github.com/TakayoshiKochi/deprecate-style-in-html-imports [2] Polymer/polymer#4679 Change-Id: I8f8490e6644f9671a4d81751ab21d8ef5fe146fd
I've opened #5017 to allow users to avoid the deprecation warning by adding a |
Does this also impact the below ? <style include="shares-styles"></style>And this is inside the template element and in Polymer 1.0 |
Should I now be able to see the effects of this deprecation if I test my site in Canary? (65.0.3323.0) |
@billhimmelsbach Seems that Canary 66 cahnged the message to May: |
Hi, I'm an owner of HTML Import in Blink. I originally introduced the flag WebFeature::kHTMLImportsHasStyleSheets to just What kind of message is better and how/when should we show it? |
How about showing the message when the stylesheet is actually applied to the document? The message was confusing because it was shown even when an workaround is applied. |
Agree with @TakayoshiKochi , that would actually be useful info. |
The warnings are putting us in a state of limbo right now. Faced with the deprecation, we want to fix up our apps and element suites asap. However the false positives are making us hold off as we aren't confident in our coverage. Additionally some of the PolymerElements we use trigger these warnings (e.g. app-drawer > iron-flex-layout) and it is time consuming getting to the bottom of the warning source. It would be really helpful if one of two things could happen (and fairly quickly with the deprecation deadline looming):
|
This is not working for me still in Chrome:
Any idea how to fix? It works on Firefox. |
Because stylesheets in HTMLImports will be deprecated in Chrome, the
custom-style
element should be updated to hoist style elements into the main document where they will apply as expected. See https://bugs.chromium.org/p/chromium/issues/detail?id=523952.The text was updated successfully, but these errors were encountered: