like this
<polymer-element name="ele-polyrow" extends="div">
</polymer-element>
is it possible to add style of ele-polyrow element.
Sure. Use the :host
pseudo-class from inside the element's template. There are a couple of things to note, though:
<div is="ele-polyrow">
rather than just <ele-polyrow>
.noscript
attribute, and Polymer will automatically register it for you.Put these things together and you get:
<polymer-element name="ele-polyrow" extends="div" noscript>
<template>
<!-- shadow DOM for the element -->
<style>
:host {
outline: 2px solid red;
}
</style>
<!-- display any children -->
<content></content>
</template>
</polymer-element>
<div is="ele-polyrow">Hey there polyrow!</div>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments