Open
Description
Should this be an RFC?
- This is not a substantial change
Which package is this a feature request for?
Lit Core (lit / lit-html / lit-element / reactive-element)
Description
This code doesn't do what it looks like it does:
import {html, css, LitElement} from 'lit';
import {customElement, property} from 'lit/decorators.js';
@customElement('simple-greeting')
export class SimpleGreeting extends LitElement {
static styles = css`p { color: red } p.bar { color: green }`;
render() {
return html`<p ${'class="bar"'}>Why isn't this green</p>`;
}
}
The expression is silently dropped in client side rendering, and I believe it's mangled in server side rendering. In dev mode, we should log a warning for this case.
Alternatives and Workarounds
The lit analyzer does warn for this currently, which helps.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status