EDIT: i made a video to present the issue. Find it here: https://streamable.com/r8sl85
I am implementing my LinkedIn badge on my website. They provide me the code. Whenever I implement it, the badge does work but unfortunately it destroys the font of my entire page. I made a simplified html to present the issue by isolate it from the rest of the unrelated code below.
These two examples have a completely different font when using the same font css file.
<link rel="stylesheet" type="text/css" href="testStyle.css">
<br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br />
Some Text underneath the Badge <br />
<i>Another line of text</i> <br />
<b>Another line of text</b> <br />
<h1>the last line of text</h1> <br />
Versus:
<link rel="stylesheet" type="text/css" href="testStyle.css">
<script src="https://platform.linkedin.com/badges/js/profile.js" async defer type="text/javascript"></script>
<div class="badge-base LI-profile-badge" data-locale="en_US" data-size="large" data-theme="light" data-type="VERTICAL" data-vanity="nick-janse-gis-rastersky" data-version="v1"></div>
Some Text underneath the Badge <br />
<i>Another line of text</i> <br />
<b>Another line of text</b> <br />
<h1>the last line of text</h1> <br />
both using the same CSS as following:
html{
font-family:"Calibri";
}
The differences in the font provided in a screenshot: The screenshot
You can see the effect yourself on my live website, if you switch from pages you can see how the font changes on the 'about me' page when the badge is loaded.
https://rastersky.com/landing?page=aboutme
I think that in the past this all worked perfectly fine, but for some reason it doesnt anymore. I suspect the javascript of linkedin has something to do with this, but still unsure.
I have tried to isolate the badge with css but this did not work:
.LinkedinBadge {
all: unset;
isolation: isolate;
}
Can anyone find out why the font is different and how I can solve this issue? Let me know if i need to provide some more details.
Thank you kindly.
Nick Janse
iframe
so that it does not interfere with the rest of the page – Serum