Skip to content
This repository was archived by the owner on Sep 20, 2019. It is now read-only.

Commit dd230d0

Browse files
committed
delete more things with the word shadow in it
1 parent 718b1b0 commit dd230d0

File tree

1 file changed

+3
-41
lines changed

1 file changed

+3
-41
lines changed

README.md

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -84,34 +84,9 @@ window.addEventListener('WebComponentsReady', function(e) {
8484

8585
## Known Issues
8686

87-
* [Limited CSS encapsulation](#encapsulation)
88-
* [Element wrapping / unwrapping limitations](#wrapping)
8987
* [Custom element's constructor property is unreliable](#constructor)
9088
* [Contenteditable elements do not trigger MutationObserver](#contentedit)
91-
* [ShadowCSS: :host-context(...):host(...) doesn't work](#hostcontext)
92-
* [ShadowCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work](#nestedparens)
93-
* [HTML imports: document.currentScript doesn't work as expected](#currentscript)
94-
* [execCommand isn't supported under Shadow DOM](#execcommand)
95-
96-
### Limited CSS encapsulation <a id="encapsulation"></a>
97-
Under native Shadow DOM, CSS selectors cannot cross the shadow boundary. This means document level styles don't apply to shadow roots, and styles defined within a shadow root don't apply outside of that shadow root. [Several selectors](http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom-201/) are provided to be able to deal with the shadow boundary.
98-
99-
The Shadow DOM polyfill can't prevent document styles from leaking into shadow roots. It can, however, encapsulate styles within shadow roots to some extent. This behavior isn't automatically emulated by the Shadow DOM polyfill, but it can be achieved by manually using the included ShadowCSS shim:
100-
101-
```
102-
WebComponents.ShadowCSS.shimStyling( shadowRoot, scope );
103-
```
104-
105-
... where `shadowRoot` is the shadow root of a DOM element, and `scope` is the name of the scope used to prefix the selectors. This removes all `<style>` elements from the shadow root, rewrites it rules using the given scope and reinserts the style as a document level stylesheet. Note that the `:host` and `:host-context` pseudo classes are also rewritten.
106-
107-
For a full explanation on the implementation and both the possibilities and the limitations of ShadowCSS please view the documentation in the [ShadowCSS source](src/ShadowCSS/ShadowCSS.js).
108-
109-
### Element wrapping / unwrapping limitations <a id="wrapping"></a>
110-
The Shadow DOM polyfill is implemented by [wrapping](http://webcomponents.org/polyfills/shadow-dom/#wrappers) DOM elements whenever possible. It does this by wrapping methods like `document.querySelector` to return wrapped DOM elements. This has a few caveats:
111-
* Not _everything_ can be wrapped. For example, elements like `document`, `window`, `document.body`, `document.fullscreenElement` and others are non-configurable and thus cannot be overridden.
112-
* Wrappers don't support [live NodeLists](https://developer.mozilla.org/en-US/docs/Web/API/NodeList#A_sometimes-live_collection) like `HTMLElement.childNodes` and `HTMLFormElement.elements`. All NodeLists are snapshotted upon read. See [#217](https://github.com/webcomponents/webcomponentsjs/issues/217) for an explanation.
113-
114-
In order to work around these limitations the polyfill provides the `ShadowDOMPolyfill.wrap` and `ShadowDOMPolyfill.unwrap` methods to respectively wrap and unwrap DOM elements manually.
89+
* [ShadyCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work](#nestedparens)
11590

11691
### Custom element's constructor property is unreliable <a id="constructor"></a>
11792
See [#215](https://github.com/webcomponents/webcomponentsjs/issues/215) for background.
@@ -124,18 +99,5 @@ It's worth noting that `customElement.__proto__.__proto__.constructor` is `HTMLE
12499
Using the MutationObserver polyfill, it isn't possible to monitor mutations of an element marked `contenteditable`.
125100
See [the mailing list](https://groups.google.com/forum/#!msg/polymer-dev/LHdtRVXXVsA/v1sGoiTYWUkJ)
126101

127-
### ShadowCSS: :host-context(...):host(...) doesn't work <a id="hostcontext"></a>
128-
See [#16](https://github.com/webcomponents/webcomponentsjs/issues/16) for background.
129-
130-
Under the shadow DOM polyfill, rules like:
131-
```
132-
:host-context(.foo):host(.bar) {...}
133-
```
134-
don't work, despite working under native Shadow DOM. The solution is to use `polyfill-next-selector` like:
135-
136-
```
137-
polyfill-next-selector { content: '.foo :host.bar, :host.foo.bar'; }
138-
```
139-
140-
### ShadowCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work <a id="nestedparens"></a>
141-
ShadowCSS `:host()` rules can only have (at most) 1-level of nested parentheses in its argument selector under ShadowCSS. For example, `:host(.zot)` and `:host(.zot:not(.bar))` both work, but `:host(.zot:not(.bar:nth-child(2)))` does not.
102+
### ShadyCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work <a id="nestedparens"></a>
103+
ShadyCSS `:host()` rules can only have (at most) 1-level of nested parentheses in its argument selector under ShadyCSS. For example, `:host(.zot)` and `:host(.zot:not(.bar))` both work, but `:host(.zot:not(.bar:nth-child(2)))` does not.

0 commit comments

Comments
 (0)