Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fonts locally and configured them with webpack #80

Merged
merged 4 commits into from
Oct 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions fonts.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare module '*.woff'
declare module '*.woff2'
3 changes: 0 additions & 3 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
You need to enable JavaScript to run this app.
</noscript>
<div id="root" style="max-width: 100vw; min-height: 100vh;"> </div>

</body>
<link href="https://fonts.googleapis.com/css?family=Open+Sans|Raleway:300,400,500,600,800" rel="stylesheet" media="none" onload="this.media='all'">


</html>
1 change: 1 addition & 0 deletions src/styles/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This file acts as a bundler for all variables/mixins/themes, so they
can easily be swapped out without `core.scss` ever having to know.
*/

@import "./base/fonts";
@import "./base/vars";
@import "./base/typography";
@import "./base/overrides";
67 changes: 67 additions & 0 deletions src/styles/base/_fonts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/* open-sans-regular - latin */
@font-face {
font-display: swap;
font-family: "Open Sans";
font-style: normal;
font-weight: 400;
src: local("Open Sans Regular"), local("OpenSans-Regular"),
url("./fonts/open-sans/open-sans-v15-latin-regular.woff2") format("woff2"),
/* Chrome 26+, Opera 23+, Firefox 39+ */
url("./fonts/open-sans/open-sans-v15-latin-regular.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* raleway-300 - latin */
@font-face {
font-display: swap;
font-family: "Raleway";
font-style: normal;
font-weight: 300;
src: local("Raleway Light"), local("Raleway-Light"),
url("./fonts/raleway/raleway-v12-latin-300.woff2") format("woff2"),
/* Chrome 26+, Opera 23+, Firefox 39+ */
url("./fonts/raleway/raleway-v12-latin-300.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* raleway-regular - latin */
@font-face {
font-display: swap;
font-family: "Raleway";
font-style: normal;
font-weight: 400;
src: local("Raleway"), local("Raleway-Regular"),
url("./fonts/raleway/raleway-v12-latin-regular.woff2") format("woff2"),
/* Chrome 26+, Opera 23+, Firefox 39+ */
url("./fonts/raleway/raleway-v12-latin-regular.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* raleway-500 - latin */
@font-face {
font-display: swap;
font-family: "Raleway";
font-style: normal;
font-weight: 500;
src: local("Raleway Medium"), local("Raleway-Medium"),
url("./fonts/raleway/raleway-v12-latin-500.woff2") format("woff2"),
/* Chrome 26+, Opera 23+, Firefox 39+ */
url("./fonts/raleway/raleway-v12-latin-500.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* raleway-600 - latin */
@font-face {
font-display: swap;
font-family: "Raleway";
font-style: normal;
font-weight: 600;
src: local("Raleway SemiBold"), local("Raleway-SemiBold"),
url("./fonts/raleway/raleway-v12-latin-600.woff2") format("woff2"),
/* Chrome 26+, Opera 23+, Firefox 39+ */
url("./fonts/raleway/raleway-v12-latin-600.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* raleway-800 - latin */
@font-face {
font-display: swap;
font-family: "Raleway";
font-style: normal;
font-weight: 800;
src: local("Raleway ExtraBold"), local("Raleway-ExtraBold"),
url("./fonts/raleway/raleway-v12-latin-800.woff2") format("woff2"),
/* Chrome 26+, Opera 23+, Firefox 39+ */
url("./fonts/raleway/raleway-v12-latin-800.woff") format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
2 changes: 1 addition & 1 deletion src/styles/base/_vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $color-gravel-approx: #dadada;
$color-cape-cod-approx: #dadada;
$color-tuatara-approx: #dadada;
// Fonts
$font-0: Raleway, sans-serif;
$font-0: "Raleway", sans-serif;
$font-1: "Open Sans", sans-serif;
// Colors
$main-white: #fafafa;
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.