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

Allow users to avoid deprecation warning re: styles in HTML imports #5017

Closed
kevinpschaaf opened this issue Jan 5, 2018 · 0 comments
Closed
Assignees

Comments

@kevinpschaaf
Copy link
Member

kevinpschaaf commented Jan 5, 2018

Per #4679 (changes landed in #4849 and #4850), we updated <custom-style> to automatically move itself to the main document to avoid breakage due to the planned deprecation in Chrome of <styles> in HTML Imports applying to the main document.

However, since the Chrome deprecation warning is logged as soon as the HTML parser sees the style in the import, the deprecation warning is misleading since the style will immediately be moved to the main document when the custom-style upgrades, avoiding any actual problems. This has confused users and also leads to muddied statistics about the actual impact of the deprecation.

This issue proposes to allow users to add a type="custom" attribute to <style> tags to prevent them from being parsed as text/css, which avoids the deprecation warning. When custom-style then moves the style to the main document, it can remove the type attribute, allowing the style to be parsed and apply as normal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants