-
Notifications
You must be signed in to change notification settings - Fork 178
/
Copy pathglobal.scss
208 lines (173 loc) · 3.76 KB
/
global.scss
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
@import './fonts.scss';
@import './variables.scss';
@import './focus.scss';
body {
margin: 0;
font-family: system-ui, -apple-system, PinaforeRegular, sans-serif;
font-size: 14px;
line-height: 1.4;
color: var(--body-text-color);
background: var(--body-bg);
-webkit-tap-highlight-color: transparent; // fix for blue background on spoiler tap on Chrome for Android
overflow-x: hidden; // Prevent horizontal scrolling on mobile Firefox on small screens
@media (max-width: 240px) {
font-size: 0.75em; /* tiny text for tiny screens */
}
}
.main-content {
contain: content; // see https://www.w3.org/TR/2018/CR-css-contain-1-20181108/#valdef-contain-content
padding-top: var(--main-content-pad-top);
}
main {
position: relative;
width: 602px;
// take into account scrollbars;
// https://stackoverflow.com/a/34884924
max-width: 100%;
padding: 0;
box-sizing: border-box;
margin: 30px auto 15px;
background: var(--main-bg);
border: 1px solid var(--main-border);
border-radius: 1px;
min-height: 70vh;
@media (max-width: 767px) {
margin: 5px auto 15px;
}
}
footer {
width: 602px;
max-width: 100vw;
box-sizing: border-box;
margin: 15px auto;
border-radius: 1px;
background: var(--main-bg);
font-size: 0.9em;
padding: 20px;
border: 1px solid var(--main-border);
}
h1, h2, h3, h4, h5, h6 {
margin: 0 0 0.5em 0;
font-weight: 400;
line-height: 1.2;
}
h1 {
font-size: 2em;
}
a {
color: var(--anchor-text);
text-decoration: none;
&:visited {
color: var(--anchor-text);
}
&:hover {
text-decoration: underline;
}
}
input {
border: 1px solid var(--input-border);
padding: 5px;
box-sizing: border-box;
}
input[type=search] {
-webkit-appearance: none; // reset Safari user agent stylesheet
}
// Fixes gray/black background when using a dark GTK theme
input, textarea {
background: inherit;
color: inherit;
}
textarea {
font-family: system-ui, -apple-system, PinaforeRegular, sans-serif, PinaforeEmoji;
}
button, .button {
font-size: 1.2em;
background: var(--button-bg);
border-radius: 2px;
padding: 10px 15px;
border: 1px solid var(--button-border);
cursor: pointer;
color: var(--button-text);
&:hover {
background: var(--button-bg-hover);
text-decoration: none;
}
&:active {
background: var(--button-bg-active);
}
&[disabled] {
opacity: 0.35;
pointer-events: none;
cursor: not-allowed;
}
&.primary {
border: 1px solid var(--button-primary-border);
background: var(--button-primary-bg);
color: var(--button-primary-text);
&:hover {
background: var(--button-primary-bg-hover);
}
&:active {
background: var(--button-primary-bg-active);
}
}
}
p, label, input {
font-size: 1.3em;
}
ul, li, p {
padding: 0;
margin: 0;
}
.hidden {
opacity: 0;
}
button::-moz-focus-inner {
border: 0;
}
/* Firefox hacks to remove ugly red border.
Unnecessary since it gives a warning if you submit an empty field anyway. */
input:required, input:invalid {
box-shadow: none;
}
textarea {
font-family: inherit;
font-size: inherit;
box-sizing: border-box;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.spin {
animation: spin 0.6s steps(8) infinite;
}
.ellipsis::after {
content: "\2026";
}
/* via https://stackoverflow.com/a/19758620 */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
/* this gets injected as raw HTML, so it's easiest to just define it in global.scss */
.inline-custom-emoji {
width: 1.4em;
height: 1.4em;
margin: -0.1em 0;
object-fit: contain;
vertical-align: middle;
}
.inline-emoji {
font-family: PinaforeEmoji, sans-serif;
}