Closed mayank99 closed 6 months ago
Similar to <template adoptstyles="…">, there could be a way to adopt styles imperatively.
<template adoptstyles="…">
this.attachShadow({ mode: "open", adoptStyles: "inherit", });
This could be achieved by overriding attachShadow very early in the <head>. And it should take into account both .styleSheets and .adoptedStyleSheets.
attachShadow
<head>
.styleSheets
.adoptedStyleSheets
Similar to
<template adoptstyles="…">
, there could be a way to adopt styles imperatively.This could be achieved by overriding
attachShadow
very early in the<head>
. And it should take into account both.styleSheets
and.adoptedStyleSheets
.