Skip to content

Commit

Permalink
feat(core): add placeholder inter typeface
Browse files Browse the repository at this point in the history
  • Loading branch information
robinpyon committed Sep 13, 2023
1 parent 47f3be9 commit bf3df9a
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion packages/sanity/src/core/components/DefaultDocument.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,24 @@ import {NoJavascript} from './NoJavascript'
import {GlobalErrorHandler} from './globalErrorHandler'
import {Favicons} from './Favicons'

// @todo: replace with fonts on our origin
const globalStyles = `
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 100 900;
font-display: swap;
src: url("https://rsms.me/inter/font-files/Inter-roman.var.woff2?v=3.19") format("woff2");
font-named-instance: 'Regular';
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 100 900;
font-display: swap;
src: url("https://rsms.me/inter/font-files/Inter-italic.var.woff2?v=3.19") format("woff2");
font-named-instance: 'Italic';
}
html {
background-color: #f1f3f6;
}
Expand Down Expand Up @@ -51,7 +68,8 @@ export function DefaultDocument(props: DefaultDocumentProps): React.ReactElement
{css.map((href) => (
<link key={href} rel="stylesheet" href={href} />
))}
<style>{globalStyles}</style>
{/* eslint-disable-next-line react/no-danger */}
<style dangerouslySetInnerHTML={{__html: globalStyles}} />
</head>
<body>
<div id="sanity" />
Expand Down

0 comments on commit bf3df9a

Please sign in to comment.