This repository has been archived by the owner on Dec 19, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
/
socrates.sass
479 lines (370 loc) · 7.88 KB
/
socrates.sass
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
@import symbolset/ss-standard
@mixin flexbox()
display: -webkit-box
display: -moz-box
display: -ms-box
display: -webkit-flex
display: -moz-flex
display: -ms-flex
display: flex
@mixin vertical-flexbox()
-webkit-box-orient: vertical
-moz-box-orient: vertical
-ms-box-orient: vertical
-webkit-flex-direction: column
-moz-flex-direction: column
-ms-flex-direction: column
flex-direction: column
@mixin flex($flex)
-webkit-box-flex: $flex
-moz-box-flex: $flex
-ms-box-flex: $flex
-webkit-flex: $flex
-moz-flex: $flex
-ms-flex: $flex
flex: $flex
@mixin mono()
font-family: "inconsolata", monospace
@mixin serif()
font-family: "kepler-std", serif
// Constants
// ---------
$red : #f57e5d
$yellow : #f5d371
$aqua : #49b27d
$blue : #4b8b8d
$purple : #957a96
$sand : #fcfcfa
$dark-aqua: darken($aqua, 7%)
$dark-sand: #f7f6f2
$text: #35332e
$rule: #eee
$button-padding: .5rem
// Base
// ----
html
font-size: 16px
line-height: 1.45
color: $text
overflow-y: scroll
overflow-x: hidden
@media (min-width: 1200px)
font-size: 17px
@media (min-width: 1300px)
font-size: 18px
@media (min-width: 1600px)
font-size: 20px
@media (min-width: 1800px)
font-size: 22px
button
-webkit-appearance: none
-moz-appearance: none
background: transparent
border: none
font-size: 12px
color: $text
padding: $button-padding $button-padding*1.2 $button-padding*.9
cursor: pointer
opacity: .2
&:hover,
&:active,
&.pressed
opacity: 1
article
> :first-child
margin-top: 0
> *
margin-top: 1rem
margin-bottom: 1rem
h1
font-size: 1.5rem
margin-top: 4rem
margin-bottom: 2.5rem
position: relative
text-align: center
&::after
content: ''
width: 100px
left: 50%
margin-left: -50px
border-bottom: 1px solid $rule
top: 100%
position: absolute
margin-top: 1rem
h2
font-size: 1.25rem
margin-top: 2rem
h3,
h4,
h5,
h6,
font-size: 1rem
margin-top: 2rem
margin-bottom: -.5rem
p
text-align: justify
-webkit-hyphens: auto
-moz-hyphens: auto
-ms-hyphens: auto
-o-hyphens: auto
hyphens: auto
blockquote
margin-top: 1.5rem
margin-bottom: 1.5rem
font-style: italic
a
position: relative
color: $aqua
&:hover,
&:focus
color: $dark-aqua
&:active
top: 1px
ul,
ol
margin-left: 2em
font-size: .9em
> li
margin-top: .5em
margin-bottom: .5em
ul
list-style-type: disc
pre,
code
+mono
margin-top: 1.5rem
margin-bottom: 1.5rem
pre
font-size: .8em
code
font-size: .95em
hr
background: transparent
border: none
width: 100px
margin: 1.5em auto
border-bottom: 1px solid $rule
img
max-width: 100%
textarea
-webkit-appearance: none
-moz-appearance: none
display: block
border: none
background: transparent
resize: none
&:focus
outline: none
// Layout
// ------
*
margin: 0
padding: 0
body
+flexbox
// Fix weirdness with Firefox.
html
height: 100%
width: 100%
body
min-height: 100%
min-width: 100%
.write,
.read
position: relative
overflow: hidden
.write
+flex(0)
+flexbox
+vertical-flexbox
width: 33rem
.write-form
position: relative
+flex(1)
.read
+flex(1)
// Write & Read
// ------------
.write-textarea-wrap,
.document-article
padding: 3rem
max-width: 32rem
margin: 0 auto
.write-buttons,
.read-buttons
position: relative
overflow: hidden
z-index: 1
// Read
// ----
.read
+serif
border-left: 1px solid darken($sand, 6%)
box-shadow: 0 -1px 10px darken($sand, 6%)
.document-article
.read-only-button
float: left
// Write
// -----
.write
background: $sand
.write,
.document-textarea
+mono
font-size: 12px
line-height: 1.2
@media (min-width: 1200px)
font-size: 14px
.write-textarea-wrap
position: absolute
top: 0
left: 0
right: 0
bottom: 0
.document-textarea
position: relative
width: 100%
height: 100%
&::-webkit-scrollbar
width: 7px
&::-webkit-scrollbar-track
margin: 3rem
&::-webkit-scrollbar-thumb
border-radius: 14px
background: darken($dark-sand, 5%)
.document-menu
list-style: none
position: relative
background-color: $dark-sand
border-top: 1px darken($dark-sand, 5%) solid
border-bottom: 1px darken($dark-sand, 5%) solid
box-shadow: inset 2px 0 6px darken($dark-sand, 6%)
// Initial display state.
display: none
// For safety, give a reasonable max-height and just don't show a scrollbar
// since I don't want to deal with styling it right now.
max-height: 500px
overflow-y: auto
&::-webkit-scrollbar
width: 0
.document-menu-item
overflow: hidden
cursor: pointer
&:hover,
&:focus
background: rgba($text, .01)
outline: none
color: $aqua
&:active
color: $dark-aqua
.document-menu-item-wrap
position: relative
// Match textarea width.
max-width: 26rem
margin: 0 auto
// Clearfix.
overflow: hidden
.document-menu-item-title
// Match button padding.
padding: $button-padding 0 $button-padding*.9
// Make sure it overflows with an ellipsis
position: absolute
left: 0
right: 2em
top: 0
overflow: hidden
text-overflow: ellipsis
white-space: nowrap
.document-menu-item-delete-button
float: right
opacity: .15
.menu-button,
.add-button
float: left
.write-only-button
float: right
// Reduce the padding between the two buttons.
.add-button
padding-left: $button-padding / 1.5
.menu-button
padding-right: $button-padding / 1.5
// Write & Read Only
// -----------------
.write-only .read,
.read-only .write
+flex(0)
.write-only .read
width: 37rem
margin-right: -30rem
.read-only .write
margin-left: -26rem
.write-only .write,
.read-only .read
+flex(1)
// Attribution
// -----------
.attribution
+serif
padding: 1rem
text-align: center
color: rgba($text, .4)
.segmentio-link,
.firebase-link
vertical-align: middle
display: inline-block
text-indent: -9999px
background-size: cover
background-repeat: none
background-position: center center
margin-left: .3em
opacity: .4
&:hover
opacity: 1
.segmentio-link
background-image: url('images/segmentio.png')
width: 110px
height: 20px
.firebase-link
background-image: url('images/firebase.png')
width: 98px
height: 19px
// Code Highlighting
// -----------------
// Everything's purple or light gray.
pre
.comment
color: lighten($text, 45%)
.constant,
.storage,
.tag,
.keyword:not(.operator),
.selector,
.string:not(.value),
.regexp,
.function
color: $blue
// Print Styles
// ------------
// Contributed by https://github.com/SimpleAsCouldBe with slight modifications.
@media print
.write,
.read-buttons
display: none
.read
border: none
box-shadow: none
.document-article
margin: 0 auto
max-width: 35em
padding: 0
@page
margin: 5em 0
*
background: white !important
color: black !important
a
text-decoration: none !important
a[href]::after
content: " (" attr(href) ")"
img
max-width: 100% !important