Created
November 11, 2019 06:05
-
-
Save sajadtorkamani/342b6127fbab49cb0621e53ab6578bbd to your computer and use it in GitHub Desktop.
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
import { createGlobalStyle } from 'styled-components'; | |
import typography from './typography'; | |
const GlobalStyle = createGlobalStyle` | |
* { | |
box-sizing: border-box; | |
margin: 0; | |
padding: 0; | |
} | |
body { | |
font-family: 'Roboto', sans-serif; | |
font-weight: ${typography.robotoLight} | |
} | |
/** | |
* Paragraphs | |
*/ | |
p { | |
line-height: 1.5; | |
margin-bottom: 20px; | |
} | |
h1, h2, h3, h4, h5, h6 { | |
font-weight: ${typography.robotoMedium}; | |
} | |
/** | |
* Heading 1 | |
*/ | |
h1 { | |
font-size: 36px; | |
margin-bottom: 15px; | |
} | |
/** | |
* Heading 2 | |
*/ | |
h2 { | |
font-size: 24px; | |
margin-bottom: 15px; | |
} | |
/** | |
* Heading 3 | |
*/ | |
h3 { | |
font-size: 20px; | |
margin-bottom: 10px; | |
} | |
/** | |
* Heading 4 | |
*/ | |
h4 { | |
font-size: 18px; | |
margin-bottom: 10px; | |
} | |
p + h2, | |
p + h3, | |
p + h4 | |
{ | |
margin-top: 30px; | |
} | |
/** | |
* Lists | |
*/ | |
ul, ol { | |
margin-bottom: 22px; | |
margin-top: 22px; | |
padding-left: 35px; | |
li { | |
margin-bottom: 12px; | |
} | |
} | |
`; | |
export default GlobalStyle; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment