Skip to content

Commit

Permalink
Adds README to Declarative Shadow DOM example.
Browse files Browse the repository at this point in the history
Refs #38.

Forgot to include this with the initial implementation.
  • Loading branch information
dgp1130 committed Sep 7, 2021
1 parent 98afff8 commit 02737f6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions examples/declarative_shadow_dom/README.md
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).

0 comments on commit 02737f6

Please sign in to comment.