Skip to content

Commit

Permalink
remove custom font and document how to add one (#562)
Browse files Browse the repository at this point in the history
* remove custom font and document how to add one

* minor indent fixes

* fix wrong instruction

* fix pr comments
  • Loading branch information
matt-kinton authored Dec 18, 2023
1 parent b641031 commit 71d66f8
Show file tree
Hide file tree
Showing 34 changed files with 141 additions and 390 deletions.
3 changes: 0 additions & 3 deletions app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import {
DropdownMenuTrigger,
} from './components/ui/dropdown-menu.tsx'
import { Icon, href as iconsHref } from './components/ui/icon.tsx'
import fontStyleSheetUrl from './styles/font.css'
import tailwindStyleSheetUrl from './styles/tailwind.css'
import { getUserId, logout } from './utils/auth.server.ts'
import { ClientHintCheck, getHints, useHints } from './utils/client-hints.tsx'
Expand All @@ -63,7 +62,6 @@ export const links: LinksFunction = () => {
// Preload svg sprite as a resource to avoid render blocking
{ rel: 'preload', href: iconsHref, as: 'image' },
// Preload CSS as a resource to avoid render blocking
{ rel: 'preload', href: fontStyleSheetUrl, as: 'style' },
{ rel: 'preload', href: tailwindStyleSheetUrl, as: 'style' },
cssBundleHref ? { rel: 'preload', href: cssBundleHref, as: 'style' } : null,
{ rel: 'mask-icon', href: '/favicons/mask-icon.svg' },
Expand All @@ -80,7 +78,6 @@ export const links: LinksFunction = () => {
} as const, // necessary to make typescript happy
//These should match the css preloads above to avoid css as render blocking resource
{ rel: 'icon', type: 'image/svg+xml', href: '/favicons/favicon.svg' },
{ rel: 'stylesheet', href: fontStyleSheetUrl },
{ rel: 'stylesheet', href: tailwindStyleSheetUrl },
cssBundleHref ? { rel: 'stylesheet', href: cssBundleHref } : null,
].filter(Boolean)
Expand Down
328 changes: 0 additions & 328 deletions app/styles/font.css

This file was deleted.

2 changes: 1 addition & 1 deletion app/styles/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@layer base {
:root {
--font-sans: Nunito Sans, Nunito Sans Fallback;
/* --font-sans: here if you have one */
/* --font-mono: here if you got it... */

/* prefixed with foreground because it should look good on the background */
Expand Down
Loading

0 comments on commit 71d66f8

Please sign in to comment.