Preload code font

Eliminate visual negative effects (such as invisible text or reflow)
caused by the font being unavailable while the browser attempts to use
it in the DOM.

Change-Id: Ia9c8562a76df1ee4adebe20b3dceb17c230b3739
This commit is contained in:
Viktar Donich 2016-11-15 16:21:25 -08:00 committed by Andrew Bonventre
parent 8dc2cf216f
commit 7a1aef251d
1 changed files with 6 additions and 0 deletions

View File

@ -20,6 +20,12 @@ limitations under the License.
<meta name="description" content="Gerrit Code Review">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<!--
SourceCodePro fonts are used in styles/fonts.css
@see https://github.com/w3c/preload/issues/32 regarding crossorigin
-->
<link rel="preload" href="/fonts/SourceCodePro-Regular.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/fonts/SourceCodePro-Regular.woff" as="font" type="font/woff" crossorigin>
<link rel="stylesheet" href="/styles/fonts.css">
<link rel="stylesheet" href="/styles/main.css">
<script src="/bower_components/webcomponentsjs/webcomponents-lite.js"></script>