Refines how element styles are marshaled for custom elements #2198
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refines how element styles are marshaled for custom elements.
<custom-style>
now supports amodule
attribute that is a space separated list of<dom-module>
id
's which contain style data.<style>
elements in custom element<dom-module>
's also support amodule
attribute<dom-module>
's can marshal style data from<style>
elements inside themselves OR inside contained<template>
's.Loading remote style data should now be done by loading an import containing a dom-module and marshaling the data using the module attribute as described above.
We will soon be deprecating the use of an HTML Import inside a
<dom-module>
to load style data. This allows a file to contain pure css text like a stylesheet file, but it causes the file to parse as HTML which has too many negative side effects: possible security concern, performance issue, and generates warning message in chrome.