-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbasic.js
51 lines (42 loc) · 799 Bytes
/
basic.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// @flow
import { injectGlobal } from 'styled-components'
import { join, map, range } from 'lodash'
import { colors, bold, typeScale, scale } from './style'
injectGlobal`
* { box-sizing: border-box; }
body {
line-height: 1.5;
margin: 0;
color: ${colors.black};
text-align: center;
}
img {
max-width: 100%;
height: auto;
}
svg {
max-height: 100%;
}
a {
color: ${colors.blue};
text-decoration: none;
}
strong {
font-weight: bold;
}
h1, h2, h3, h4 {
color: ${colors.steel};
font-weight: bold;
line-height: 1.25;
margin-top: ${scale[2]}px;
margin-bottom: ${scale[1]}px;
}
${join(
map(range(1, 4), level => `h${level} { font-size: ${typeScale[level]}px; }`),
'\n'
)}
p, ol, ul, pre, blockquote {
margin-top: ${scale[2]}px;
margin-bottom: ${scale[2]}px;
}
`