From bf3df9a7cdfcc23f8921749dc1ff54a7f2a134c0 Mon Sep 17 00:00:00 2001 From: Robin Pyon Date: Wed, 13 Sep 2023 00:17:34 +0100 Subject: [PATCH] feat(core): add placeholder inter typeface --- .../src/core/components/DefaultDocument.tsx | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/sanity/src/core/components/DefaultDocument.tsx b/packages/sanity/src/core/components/DefaultDocument.tsx index b6ad8aa2d46..3c4805a9ed0 100644 --- a/packages/sanity/src/core/components/DefaultDocument.tsx +++ b/packages/sanity/src/core/components/DefaultDocument.tsx @@ -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; } @@ -51,7 +68,8 @@ export function DefaultDocument(props: DefaultDocumentProps): React.ReactElement {css.map((href) => ( ))} - + {/* eslint-disable-next-line react/no-danger */} +