Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced typography plugin with a global css files
This is to simplify the template and show how global css can be created manually. Replacing with the typography plugin is always possible and easy!
- Loading branch information
1 parent
4c3723c
commit df1775a
Showing
9 changed files
with
145 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,20 @@ | ||
require('typeface-roboto'); | ||
require('./src/styles/styles.css'); | ||
|
||
// onClientEntry() must be included for the requires above to be triggered, | ||
// even if it is empty! | ||
exports.onClientEntry = () => {}; | ||
exports.onClientEntry = () => { | ||
// Load Roboto font to support Material Design | ||
const pathRoboto = | ||
'https://fonts.googleapis.com/css?family=Roboto:300,400,500'; | ||
const linkRoboto = document.createElement('link'); | ||
linkRoboto.setAttribute('rel', 'stylesheet'); | ||
linkRoboto.setAttribute('href', pathRoboto); | ||
document.head.appendChild(linkRoboto); | ||
|
||
// Load Material Icons | ||
const pathIcons = 'https://fonts.googleapis.com/icon?family=Material+Icons'; | ||
const linkIcons = document.createElement('link'); | ||
linkIcons.setAttribute('rel', 'stylesheet'); | ||
linkIcons.setAttribute('href', pathIcons); | ||
document.head.appendChild(linkIcons); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* Apply a natural box layout model to all elements, but allowing components to change */ | ||
html { | ||
box-sizing: border-box; | ||
} | ||
*, *:before, *:after { | ||
box-sizing: inherit; | ||
} | ||
|
||
/* Reset */ | ||
html, body, div { | ||
border: 0; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
body { | ||
background: #fafafa; | ||
font-family: "Roboto", "Helvetica", "Arial", sans-serif; | ||
font-size: 14px; | ||
color: rgba(0, 0, 0, 0.87); | ||
|
||
/* Helps fonts on OSX look more consistent with other systems */ | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
|
||
/* Use momentum-based scrolling on iOS devices */ | ||
-webkit-overflow-scrolling: touch; | ||
} | ||
|
||
h1 { | ||
margin: 0 0 .35em 0; | ||
color: rgba(0, 0, 0, 0.54); | ||
font-size: 2.8125rem; | ||
font-weight: 400; | ||
line-height: 1.13333em; | ||
} | ||
|
||
h2 { | ||
margin: 0 0 .35em 0; | ||
color: rgba(0, 0, 0, 0.87); | ||
font-size: 1.3125rem; | ||
font-weight: 500; | ||
line-height: 1.16667em; | ||
} | ||
|
||
p { | ||
margin: 0 0 1em 0; | ||
color: rgba(0, 0, 0, 0.87); | ||
font-size: 0.875rem; | ||
font-weight: 400; | ||
line-height: 1.46429em; | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.