Move loading font to the end of the style not to block applying the style while loading the font and thus allowing the logo to scale uncontrolably under certain conditions and browsers.

The original bug is only visible in scaled variants - <patek-logo style="font-size: 100px;"></patek-logo>.
This commit is contained in:
Vojtěch Káně 2019-07-17 10:28:34 +02:00
parent c0accc71f2
commit edd2da4714

View File

@ -1,7 +1,6 @@
const template = document.createElement("template"); const template = document.createElement("template");
template.innerHTML = ` template.innerHTML = `
<style> <style>
@import 'https://unpkg.com/firacode@1.206.0/distr/fira_code.css';
svg > * { svg > * {
fill: currentColor; fill: currentColor;
} }
@ -48,6 +47,7 @@ template.innerHTML = `
margin-bottom: -0.3em; margin-bottom: -0.3em;
height: 2em; height: 2em;
} }
@import 'https://unpkg.com/firacode@1.206.0/distr/fira_code.css';
</style> </style>
<span id="wrapper"> <span id="wrapper">
<span id="titlePlaceholder"></span> <span id="titlePlaceholder"></span>