tomayac’s avatartomayac’s Twitter Archive—№ 18,408

  1. Using CSS Module Scripts to import stylesheets web.dev/css-module-scripts/, by @dandclark1. js import sheet from './styles.css' assert { type: 'css' }; document.adoptedStyleSheets = [sheet]; shadowRoot.adoptedStyleSheets = [sheet];
    1. …in reply to @tomayac
      There's now a polyfill for this feature: x.com/guybedford/status/1428451066081730561.