Skip to content

Commit

Permalink
[ci-skip] Add limitation on external stylesheets
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf authored May 31, 2017
1 parent aa37bed commit 05a16c2
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,21 @@ defines the property in its host's stylesheet.

### `<custom-style>` Flash of unstyled content

If `ShadyCss.applyStyle` is never called, `<custom-style>` elements will process
If `ShadyCSS.applyStyle` is never called, `<custom-style>` elements will process
after HTML Imports have loaded, after the document loads, or after the next paint.
This means that there may be a flash of unstyled content on the first load.

### Mixins do not cascade throught `<slot>`

Crawling the DOM and updating styles is very expensive, and we found that trying to
update mixins through `<slot>` insertion points to be too expensive to justify for both
polyfilled CSS Mixins and polyfilled CSS Custom Properties.
polyfilled CSS Mixins and polyfilled CSS Custom Properties.

### External stylesheets not currently supported

External stylesheets loaded via `<link rel="stylesheet">` within a shadow root or
`@import` syntax inside a shadow root's stylesheet are not currently shimmed by
the polyfill. This is mainly due to the fact that shimming them would require
a fetch of the stylesheet text that is async cannot be easily coordinated with
the upgrade timing of custom elements using them, making it impossible to avoid
"flash of unstyled content" when running on polyfill.

0 comments on commit 05a16c2

Please sign in to comment.