I think it's possible.
- Extract css to file
- Compile less
, bable Polymer. gulp -crisper html, .
<dom-module id="html-echo">
<style>
:host {
display: block;
}
</style>
<template>
</template>
</dom-module>
<script>
(function () {
Polymer({
is: 'html-echo',
properties: {
html: {
type: String,
observer: '_htmlChanged'
}
},
_htmlChanged(neo) {
this.innerHTML = neo;
}
});
})();
</script>
: html-echo.html
<html><head></head><body><dom-module id="html-echo">
<style>
:host {
display: block;
}
</style>
<template>
</template>
</dom-module>
<script src="html-echo.js"></script></body></html>
html-echo.js
'use strict';
(function () {
Polymer({
is: 'html-echo',
properties: {
html: {
type: String,
observer: '_htmlChanged'
}
},
_htmlChanged: function _htmlChanged(neo) {
this.innerHTML = neo;
}
});
})();
, , , css, ( ) Polymer , , .
, , css parser .: P