Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions wds-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ export function appendStyles(html) {
const preventFouc = `
<style>
body:not(.resolved) {
opacity: 0;
}

body {
transition: opacity 0.2s;
display: none;
}
</style>

Expand Down
9 changes: 8 additions & 1 deletion web-dev-server.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ export function enforceThemePlugin(theme) {

if (theme === 'aura' && context.response.is('html')) {
// For dev pages: add Aura Stylesheet
body = body.replace('</title>', '</title><link rel="stylesheet" href="/packages/aura/aura.css" />');
body = body.replace(
'</title>',
`
</title>
<link rel="preload" href="/packages/aura/src/fonts/InstrumentSans/InstrumentSans.woff2" as="font" type="font/woff2" crossorigin>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would only work for yarn start:aura but not when running yarn start and opening aura.html
Also note that this would not apply to dev pages that are being deployed to GitHub Actions.

How about adding this to aura.html directly and checking if it's present here?

<link rel="stylesheet" href="/packages/aura/aura.css" />
`,
);
}

return body;
Expand Down