Files
polymer/test/unit/custom-style-async-import.js
Steven Orvell 8b5803c293 Fixes IE11 test issues
Use <template>.innerHTML when adding test elements to main document. Works around a template polyfill issue (https://github.com/webcomponents/template/issues/40) by setting innerHTML on a <template> element so that inner templates are correctly updated.
2018-04-30 10:55:18 -07:00

32 lines
581 B
JavaScript

import { Polymer } from '../../lib/legacy/polymer-fn.js';
const $_documentContainer = document.createElement('template');
$_documentContainer.innerHTML = `<custom-style>
<style is="custom-style">
html {
--cs-blue: {
border : 8px solid blue;
};
}
</style>
</custom-style>
<dom-module id="x-client">
<template>
<style>
:host {
display: inline-block;
border : 4px solid red;
@apply (--cs-blue);
}
</style>
x-client
</template>
</dom-module>`;
document.body.appendChild($_documentContainer.content);
Polymer({
is: 'x-client'
});