Skip to content

Commit 3471a2e

Browse files
Add inter (#1810)
* Revert "Revert "Add Inter"" This reverts commit 93a74ae. * Revert "Revert "Use styled-jsx for amp support"" This reverts commit 318f837. * Add preload * Disable `calt` in font-feature-settings * Make padding smaller Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 013e111 commit 3471a2e

File tree

6 files changed

+654
-6
lines changed

6 files changed

+654
-6
lines changed

components/feedback-input/header-feedback.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ class HeaderFeedback extends Component {
307307
--open-height: 174px;
308308
--closed-width: 90px;
309309
--closed-height: 32px;
310-
--padding: 4px 12px;
310+
--padding: 4px 10px;
311311
312312
margin-right: 8px;
313313
padding: 0;

components/layout/head.js

+7
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ class Head extends React.PureComponent {
8080
return (
8181
<>
8282
<NextHead>
83+
<link
84+
rel="preload"
85+
href="https://assets.vercel.com/raw/upload/v1587415301/fonts/2/inter-var-latin.woff2"
86+
as="font"
87+
type="font/woff2"
88+
crossOrigin="anonymous"
89+
/>
8390
<title>{titlePrefix + this.props.title + titleSuffix}</title>
8491
<meta name="twitter:card" content="summary_large_image" />
8592
<meta name="twitter:site" content="@zeithq" />

pages/_app.js

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Layout from '~/components/layout/app'
77
import DataContext from '~/lib/data-context'
88

99
import baseTheme from '../styles/themes/base'
10+
import fontTheme from '../styles/themes/font'
1011
import withTypeStyles from '../styles/with-type'
1112
import nprogressStyles from '../styles/nprogress'
1213

@@ -43,6 +44,9 @@ function MyApp({ Component, pageProps }) {
4344
</Head>
4445
<Layout data={data}>
4546
<Component {...pageProps} />
47+
<style jsx global>
48+
{fontTheme}
49+
</style>
4650
<style jsx global>
4751
{baseTheme}
4852
</style>

styles/global.css

-3
This file was deleted.

styles/themes/base.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
import css from 'styled-jsx/css'
22

33
export default css.global`
4+
html {
5+
touch-action: manipulation;
6+
font-feature-settings: 'case' 1, 'rlig' 1, 'calt' 0;
7+
text-rendering: optimizeLegibility;
8+
-webkit-font-smoothing: antialiased;
9+
-moz-osx-font-smoothing: grayscale;
10+
}
11+
412
:root {
513
/* Spacing variables */
614
--geist-gap: 16pt;
@@ -32,8 +40,8 @@ export default css.global`
3240
--geist-marketing-gray: #fafbfc;
3341
3442
/* Fonts */
35-
--font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
36-
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
43+
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto',
44+
'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
3745
sans-serif;
3846
--font-mono: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
3947
Bitstream Vera Sans Mono, Courier New, monospace;

0 commit comments

Comments
 (0)