html
<dom-module id="my-component">
<template>
<style>
:host {
display: block;
}
.title {
font-size: 20px;
color: red;
}
</style>
<div class="title">Hello Shadycss!</div>
</template>
<script>
import { ShadyCSS } from '@webcomponents/shadycss';
class MyComponent extends Polymer.Element {
connectedCallback() {
super.connectedCallback();
ShadyCSS.styleElement(this);
}
}
</script>
</dom-module>
<my-component></my-component>