-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds
README
to Declarative Shadow DOM example.
Refs #38. Forgot to include this with the initial implementation.
- Loading branch information
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Declarative Shadow DOM | ||
|
||
An example which uses | ||
[Declarative Shadow DOM](https://web.dev/declarative-shadow-dom/) to author | ||
components with strong style isolation. | ||
|
||
This uses the `@npm//rules_prerender:declarative_shadow_dom` component | ||
dependency to easily inject the Declarative Shadow DOM polyfill into the | ||
generated web page. | ||
|
||
The example also accepts input DOM and wraps it, however input DOM is insert as | ||
light DOM and placed with a `<slot></slot>` tag. This prevents the input from | ||
being included under the shadow root and having component-private styles applied | ||
to it. See [component.ts](./component.ts). |