UNPKG

@silexlabs/grapesjs-advanced-selector

Version:

A GrapesJS plugin for managing advanced CSS selectors with a visual interface

16 lines (13 loc) 440 B
import { LitElement } from 'lit' import { property } from 'lit/decorators.js' export default class StylableElement extends LitElement { @property() t: (key: string) => string = (key) => key override connectedCallback() { super.connectedCallback() const styles = document.querySelectorAll('style, link[rel="stylesheet"]') styles.forEach(style => { this.shadowRoot?.appendChild(style.cloneNode(true)) }) } }