1 | /**
|
2 | * @license
|
3 | * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
4 | * This code may only be used under the BSD style license found at
|
5 | * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
6 | * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
7 | * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
8 | * Google as part of the polymer project is also subject to an additional IP
|
9 | * rights grant found at http://polymer.github.io/PATENTS.txt
|
10 | */
|
11 | // It's desireable to provide a default stylesheet
|
12 | // that's convenient for styling unresolved elements, but
|
13 | // it's cumbersome to have to include this manually in every page.
|
14 | // It would make sense to put inside some HTMLImport but
|
15 | // the HTMLImports polyfill does not allow loading of stylesheets
|
16 | // that block rendering. Therefore this injection is tolerated here.
|
17 | //
|
18 | // NOTE: position: relative fixes IE's failure to inherit opacity
|
19 | // when a child is not statically positioned.
|
20 | const style = document.createElement('style');
|
21 | style.textContent =
|
22 | '' +
|
23 | 'body {' +
|
24 | 'transition: opacity ease-in 0.2s;' +
|
25 | ' } \n' +
|
26 | 'body[unresolved] {' +
|
27 | 'opacity: 0; display: block; overflow: hidden; position: relative;' +
|
28 | ' } \n';
|
29 | const head = document.querySelector('head');
|
30 | head.insertBefore(style, head.firstChild);
|
31 | export {};
|
32 | //# sourceMappingURL=unresolved.js.map |
\ | No newline at end of file |