Skip to content

Commit

Permalink
chore: declare fonts via linaria global styles
Browse files Browse the repository at this point in the history
it's handy because provides an ability to use theme constants.
  • Loading branch information
khmm12 committed Jun 24, 2024
1 parent 67f2448 commit 4e7404a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
7 changes: 0 additions & 7 deletions src/components/GlobalStyles/fonts/Digital7Mono/index.css

This file was deleted.

12 changes: 12 additions & 0 deletions src/components/GlobalStyles/fonts/Digital7Mono/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { css } from '@linaria/core'
import { Digital7Mono } from '@/theme/fonts'

void css`
@font-face {
font-family: ${Digital7Mono};
src: url('./digital-7mono.woff2') format('woff2');
font-weight: normal;
font-style: normal;
font-display: block;
}
`
4 changes: 2 additions & 2 deletions src/components/GlobalStyles/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { css } from '@linaria/core'
import { dark1, white } from '@/theme/colors'
import { darkScheme } from '@/theme/media'
import './fonts/Digital7Mono/index.css'
import './fonts/Digital7Mono'

css`
void css`
:global() {
html {
-webkit-text-size-adjust: 100%;
Expand Down

0 comments on commit 4e7404a

Please sign in to comment.