You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
${this.property}, where property is either defined or not,
${variable}, and
the presence of a backtick `
DO give an error!
Example
import{LitElement,css,html}from'lit';import{customElement,property}from'lit/decorators.js';
@customElement('my-element')exportclassMyElementextendsLitElement{staticstyles=css` :host { /* This is a CSS comment. */ /* The expression ${this.property} within a CSS comment DOES give an error! */ /* The expression ${global} within a CSS comment DOES give an error! */ /* The backtick (`)withinaCSScommentDOESgiveanerror!*/color: blue;}
`;
...
}}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Keep in mind that all the following:
${this.property}
, whereproperty
is either defined or not,${variable}
, and`
DO give an error!
Example
Beta Was this translation helpful? Give feedback.
All reactions