Skip to content

Commit f1311d2

Browse files
fix(fonts): component ordering (#13625)
1 parent 3838efe commit f1311d2

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changeset/thick-walls-open.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'astro': patch
3+
---
4+
5+
Updates the `<Font />` component so that preload links are generated before the style tag if `preload` is passed

packages/astro/components/Font.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ if (!data) {
2323
}
2424
---
2525

26-
<style set:html={data.css}></style>
2726
{
2827
preload &&
2928
data.preloadData.map(({ url, type }) => (
3029
<link rel="preload" href={url} as="font" type={`font/${type}`} crossorigin />
3130
))
3231
}
32+
<style set:html={data.css}></style>

0 commit comments

Comments
 (0)