Safari and Opera support Shadow DOM, Firefox has it under development. The
polyfills work, and lit-html has ShadyCSS integration as of 0.9.0.
On Feb 19, 2018 10:26 AM, "Ronn Ross" wrote:
> Thanks everyone. I also read about slot on MDN and it makes sense. I saw
> that
Thanks everyone. I also read about slot on MDN and it makes sense. I saw
that chrome only supports this, so will this be covered by the polyfill in
other browsers?
On Monday, February 19, 2018 at 11:27:00 AM UTC-5, Justin Fagnani wrote:
>
> For projecting child content, you need to use s:
>
Neither lit-html or LitElement really help here yet, because the host
element is not under control of its own template.
Right now using className or classList in render() is the best option.
render() {
this.className = this.kind;
}
or if you have other classes you need to not disturb:
const
For projecting child content, you need to use s:
https://developers.google.com/web/fundamentals/web-components/shadowdom#slots
class MyButton extends LitElement {
constructor(...args) {
super();
}
render() {
return html`
`;
}
}
On Mon, Feb 19, 2018 at
I have a simple button component.
I trying to get the child content and pass it through to the button. Here
is an example:
this is some content
I can't figure out how MyButton can pass along the children
class MyButton extends LitElement {
constructor(...args) {
super();
}
I'm attempting to dynamically apply a css class using a property. For
example I want to pass in a string:
some stuff
My component looks like so:
class MyButton extends LitElement {
static get properties() {
return {
kind: String
}
}
constructor() {
super();
}
render({ kind }) {
return html`