Skip to content

Commit

Permalink
Merge pull request #34 from Marshal27/fix/Inherit_Container_Type_and_…
Browse files Browse the repository at this point in the history
…Name_from_Cascading_Stylesheet

fix: Inherit_Container_Type_and_Name_from_Cascading_Stylesheet
  • Loading branch information
Marshal27 authored Dec 8, 2022
2 parents 78bc6bf + c93fabe commit 69a19c7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,11 @@ class ShadowRootController extends NodeController<ShadowRoot> {
}

connected(): void {
window.onload = () => {
const styleElement = document.createElement("style");
styleElement.textContent = `* { ${CUSTOM_PROPERTY_TYPE}: inherit; ${CUSTOM_PROPERTY_NAME}: inherit; }`;
this.node.appendChild(styleElement);
}
this.mo?.observe(this.node, {
childList: true,
subtree: true,
Expand Down

0 comments on commit 69a19c7

Please sign in to comment.