<my-element></my-element>
<my-element></my-element>
<my-element></my-element>
import { LitElement, html } from "https://cdn.skypack.dev/lit@2.0.0-rc.2";
import styles from "https://codepen.io/chriscoyier/pen/RwVyQjN.css" assert { type: "css" };
console.log({ styles });
class MyElement extends LitElement {
static styles = styles;
render() {
return html`
<h1>Hello CSS Modules</h1>
`;
}
}
customElements.define("my-element", MyElement);
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.