/** * Tailwind's utilities, packaged as a Lit stylesheet. * * Shadow DOM does not inherit document styles, so a component's Tailwind * classes do nothing just because `global.css` is loaded. Adopting this sheet * is what makes them apply: * * static override styles = [ * tailwind, * css` * :host { * display: block; * } * `, * ]; * * Keep any handwritten block last — later stylesheets win — and reserve it for * what utilities cannot express, such as `:host` and `::slotted()`. * * `?inline` asks Vite for the compiled CSS as a string instead of injecting it * into the document. `unsafeCSS` skips Lit's usual check that a stylesheet is * a static literal, which is safe here because the value is a build artefact * rather than anything user-supplied. */ import { unsafeCSS } from 'lit'; import sheet from './shadow.css?inline'; export const tailwind = unsafeCSS(sheet);