Skip to content

Commit

Permalink
Add Poppins font
Browse files Browse the repository at this point in the history
  • Loading branch information
willianjusten committed Aug 23, 2020
1 parent badbf4a commit 93f71d0
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
Binary file added public/fonts/poppins-v12-latin-300.woff2
Binary file not shown.
Binary file added public/fonts/poppins-v12-latin-600.woff2
Binary file not shown.
Binary file added public/fonts/poppins-v12-latin-regular.woff2
Binary file not shown.
31 changes: 30 additions & 1 deletion src/styles/global.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,39 @@
import { createGlobalStyle } from 'styled-components'

const GlobalStyles = createGlobalStyle`
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 300;
font-display: swap;
src: local('Poppins Light'), local('Poppins-Light'),
url('/fonts/poppins-v12-latin-300.woff2') format('woff2');
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
font-display: swap;
src: local('Poppins Regular'), local('Poppins-Regular'),
url('/fonts/poppins-v12-latin-regular.woff2') format('woff2');
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 600;
font-display: swap;
src: local('Poppins SemiBold'), local('Poppins-SemiBold'),
url('/fonts/poppins-v12-latin-600.woff2') format('woff2');
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
html {
Expand All @@ -16,7 +45,7 @@ const GlobalStyles = createGlobalStyle`
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif
font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif
}
`

Expand Down

0 comments on commit 93f71d0

Please sign in to comment.