This repository has been archived by the owner on May 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 66
/
global-styles.js
executable file
·123 lines (106 loc) · 2.72 KB
/
global-styles.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import remcalc from 'remcalc'
import { createGlobalStyle } from 'styled-components'
const GlobalStyle = createGlobalStyle`
@import url('https://fonts.googleapis.com/css?family=Montserrat:300,400,700');
@import url('https://fonts.googleapis.com/css?family=Space+Mono');
body {
margin: 0;
padding: 0;
font-family: Avenir, Montserrat, Arial, sans-serif;
font-size: ${remcalc(14)};
color: #666;
letter-spacing: ${remcalc(0.11)};
line-height: ${remcalc(21)};
padding-bottom: ${remcalc(40)};
background-color: ${props => props.theme.primary};
}
body.cinema-mode {
overflow: hidden;
}
div[id*='do-not-delete-this-hack'] {
display: none;
}
code {
font-family: 'Space Mono', monospace;
}
button {
font-family: Avenir, Montserrat, Arial, sans-serif;
}
nav a {
padding: 7px 14px;
border-bottom: ${remcalc(2)} solid ${props => props.theme.blue};
}
a,
.link {
border: none;
color: ${props => props.theme.blue};
text-decoration: none;
position: relative;
opacity: 0.8;
font-weight: 300;
letter-spacing: ${remcalc(0.09)};
text-align: left;
line-height: ${remcalc(21)};
font-size: ${remcalc(14)};
cursor: pointer;
transition: color 200ms ease;
&.no-hover {
line-height: 1.8;
&:hover {
color: ${props => props.theme.blue};
}
&:after {
display: none;
}
}
span {
position: relative;
z-index: 10;
}
&.active_nav{
color: #fff;
height: ${remcalc(35)};
top: ${remcalc(-6)};
&:after {
left: 0;
z-index: -1;
}
&:hover{
box-shadow: 0 4px 8px 0 rgba(0,0,0,.12), 0 2px 4px 0 rgba(0,0,0,.08);
}
}
@media (pointer: coarse) {
&.active_nav{
top: ${remcalc(1)};;
background: none;
color: ${props => props.theme.blue};
}
}
@media (pointer: fine) {
&:after {
transition: height 200ms ease;
content: '';
width: 100%;
height: 0;
background: ${props => props.theme.blue};
display: block;
position: absolute;
bottom: 0;
z-index: 0;
border-radius: 2px 2px 0 0;
}
&.active_nav, &:hover {
color: ${props => props.theme.primary};
&:after {
height: 100%;
}
}
}
}
ul {
padding: 0;
margin: 0;
list-style: none;
}
`
export default GlobalStyle