Currently, I am working on integrating an animation when the app starts within the contents of
<app-root>...</app-root>
. To achieve this, I have made the following changes:
<app-root>
<style>
h1 {
font-family: 'Calibre Medium';
color: black;
font-size: 2rem;
margin: 0;
letter-spacing: 1px;
}
</style>
<h1>Test</h1>
</app-root>
The content is displayed as intended, however, there seems to be a delay in loading its CSS. This results in the initial display having a different font style which then corrects itself after approximately 1 second.
Is there any way to optimize this loading process or are there alternative methods to achieving this desired behavior?
EDIT: Previously attempted to load the styles within the document's head and used style.css
but encountered no noticeable difference.
EDIT: Wondering if the use of bootstrap could potentially be causing this issue?