From 05a16c279897fa6d520169a0fad3975fa75ea690 Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Tue, 30 May 2017 17:42:53 -0700 Subject: [PATCH] [ci-skip] Add limitation on external stylesheets --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 25b994505..7bac0f3cb 100644 --- a/README.md +++ b/README.md @@ -333,7 +333,7 @@ defines the property in its host's stylesheet. ### `` Flash of unstyled content -If `ShadyCss.applyStyle` is never called, `` elements will process +If `ShadyCSS.applyStyle` is never called, `` 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. @@ -341,4 +341,13 @@ This means that there may be a flash of unstyled content on the first load. Crawling the DOM and updating styles is very expensive, and we found that trying to update mixins through `` insertion points to be too expensive to justify for both -polyfilled CSS Mixins and polyfilled CSS Custom Properties. \ No newline at end of file +polyfilled CSS Mixins and polyfilled CSS Custom Properties. + +### External stylesheets not currently supported + +External stylesheets loaded via `` 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.