Skip to content

Commit 6d30b66

Browse files
committed
Reduce Demo1 shadow trees to just 1 <div>
1 parent e9978fb commit 6d30b66

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

demo1/cssModuleElement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class CSSModuleTestElement extends HTMLElement {
77
this.shadow.adoptedStyleSheets = [sheet];
88

99
this.shadow.innerHTML =
10-
`<div class="outer-container"><div class="text-container">This text should be styled</div></div>`;
10+
`<div class="outer-container text-container">This text should be styled</div>`;
1111
}
1212
}
1313
export {CSSModuleTestElement};

demo1/linkInShadowElement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class LinkTestElement extends HTMLElement {
44
this.shadow = this.attachShadow({mode: "closed"});
55

66
this.shadow.innerHTML =
7-
`<link rel="stylesheet" href="styles.css" /><div class="outer-container"><div class="text-container">This text should be styled</div></div>`;
7+
`<link rel="stylesheet" href="styles.css" /><div class="outer-container text-container">This text should be styled</div>`;
88
}
99
}
1010
export {LinkTestElement};

demo1/styleInShadowElement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class StyleTestElement extends HTMLElement {
2222
text-fill-color: transparent;
2323
-webkit-text-fill-color: transparent;
2424
}
25-
</style><div class="outer-container"><div class="text-container">This text should be styled</div></div>`;
25+
</style><div class="outer-container text-container">This text should be styled</div>`;
2626
}
2727
}
2828
export {StyleTestElement};

0 commit comments

Comments
 (0)