A web-based drawing app
git clone git://soophie.de/outline
blob: 303b4a7c716c9231873c46ea74682291047d5d88 (7800 bytes)[doc][blame][raw]
1
canvas.canvas {2
position: relative;3
z-index: 1;4
cursor: none;5
touch-action: none;6
}8
canvas.overlay {9
pointer-events: none;10
user-select: none;11
position: absolute;12
top: 0;13
left: 0;14
right: 0;15
bottom: 0;16
z-index: 99;17
}19
.wrapper {20
width: 100vw;21
height: 100vh;22
position: fixed;23
top: 0;24
left: 0;25
right: 0;26
bottom: 0;27
display: flex;28
justify-content: center;29
align-items: center;30
background: rgba(0, 0, 0, 0.2);31
z-index: 99999;32
user-select: none;33
}35
.spinner {36
width: 80px;37
height: 80px;38
border-radius: 40px;39
border: 10px solid rgba(255,255,255,0.2);40
border-top: 10px solid white;41
animation: spin 2s linear infinite;42
}44
@keyframes spin {45
0% { transform: rotate(0deg); }46
100% { transform: rotate(360deg); }47
}49
.modal {50
background: white;51
width: 400px;52
border-radius: 6px;53
padding: 20px;54
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.03);56
&.modal-error {57
width: 300px;59
.align {60
justify-content: flex-end;61
}62
}64
&.theme-dark {65
background: @color-dark;66
color: white;68
button.action-cancel {69
background: @color-dark-grey;70
color: white;72
&:hover {73
background: lighten(@color-dark-grey, -2%);74
}75
}77
input[type="text"] {78
background: @color-black;79
color: white;81
&:hover {82
background: lighten(@color-black, -2%);83
}85
&:focus {86
background: lighten(@color-black, -2%);87
}88
}90
.separator {91
border-color: @color-dark-grey;92
}94
input[type="range"] {95
background: lighten(@color-black, 2%);96
}98
.preview {99
background: lighten(@color-black, 2%);100
}102
ul.avatar-list {104
li.avatar {105
border-color: @color-dark;106
background: lighten(@color-black, 1%);108
&:hover {109
border-color: lighten(@color-black, 3.5%);110
}111
}112
}113
}115
input.action-uuid,116
input.action-file {117
padding: 12px 14px;118
width: 100%;119
border: none;120
background: #FAFAFA;121
border-radius: 3px;122
font-size: 16px;123
user-select: none;125
&:hover {126
background: #F8F8F8;127
}129
&:focus {130
background: #F5F5F5;131
}132
}134
.separator {135
border-top: 1px solid #F5F5F5;136
margin: 20px 0;137
}139
.align {140
display: flex;141
justify-content: space-between;142
align-items: center;143
}145
p {146
font-size: 18px;147
letter-spacing: 0.2px;148
padding-top: 5px;149
margin-bottom: 25px;150
}152
button {153
padding: 12px 14px;154
border: none;155
background: #F8F9FA;156
border-radius: 3px;157
font-size: 16px;158
cursor: pointer;159
user-select: none;160
transition: background 0.1s;161
color: #212121;163
&:hover {164
background: lighten(#F8F9FA, -5%);165
}167
&.success {168
background: #28A745;169
color: white;171
&:hover {172
background: lighten(#28A745, -5%);173
}174
}176
&.danger {177
background: #DC3545;178
color: white;180
&:hover {181
background: lighten(#DC3545, -5%);182
}183
}185
&.info {186
background: #007BFF;187
color: white;189
&:hover {190
background: lighten(#007BFF, -5%);191
}192
}193
}195
button.action-join {196
width: 100%;197
}199
button.action-cancel {200
width: calc(50% - 10px);201
}203
button.action-save,204
button.action-clear,205
button.action-background,206
button.action-scaling,207
button.action-color,208
button.action-default {209
width: calc(50% - 10px);210
}212
ul.avatar-list {213
display: flex;214
flex-wrap: wrap;215
width: 100%;216
list-style-type: none;218
li.avatar {219
background: #EEE;220
border-radius: 9999px;221
border: 5px solid white;222
margin: 10px;223
width: 70px;224
height: 70px;225
cursor: pointer;226
transition: border-color 0.1s;228
&:hover {229
border: 5px solid #F8F8F8;230
}231
}232
}234
input.action-range {235
width: calc(100% - 80px);236
-webkit-appearance: none;237
background: #F8F8F8;238
height: 6px;240
&:hover {241
background: #F5F5F5;243
&::-webkit-slider-thumb {244
background: lighten(#888888, -20%);245
}246
}248
&::-webkit-slider-thumb {249
-webkit-appearance: none;250
background: #888888;251
width: 20px;252
height: 20px;253
border-radius: 9999px;254
border: none;255
cursor: pointer;256
transition: background 0.1s;257
}259
&::-webkit-slider-runnable-track {260
-webkit-appearance: none;261
}262
}264
.preview {265
width: 60px;266
height: 60px;267
background: #F5F5F5;268
border-radius: 9999px;269
display: flex;270
justify-content: center;271
align-items: center;273
.circle {274
width: 12px;275
height: 12px;276
background: #212121;277
border-radius: 9999px;278
}279
}281
&.modal-color {282
width: 420px;283
position: relative;285
&:before {286
content: '';287
display: block;288
position: absolute;289
top: 20px;290
left: 20px;291
right: 26px;292
height: 10px;293
background: linear-gradient(white, transparent);294
z-index: 9;295
}297
&:after {298
content: '';299
display: block;300
position: absolute;301
bottom: 82px;302
left: 20px;303
right: 26px;304
height: 10px;305
background: linear-gradient(transparent, white);306
z-index: 9;307
}309
.bucket-list {310
max-height: 400px;311
overflow-x: hidden;312
overflow-y: auto;313
padding-top: 10px;314
padding-bottom: 10px;315
margin-bottom: 20px;317
&::-webkit-scrollbar {318
width: 6px;319
}321
&::-webkit-scrollbar-thumb {322
width: 6px;323
background: #EEE;325
&:hover {326
background: #CACACA;327
}328
}329
}331
.align {332
width: 100%;333
justify-content: flex-end;334
}335
}337
.bucket-list {338
display: flex;339
flex-wrap: wrap;340
width: 100%;341
list-style-type: none;343
.bucket {344
background: #EEE;345
border-radius: 9999px;346
margin: 10px;347
width: 70px;348
height: 70px;349
cursor: pointer;350
transition: transform 0.2s;351
box-shadow: 0 0px 8px 2px rgba(0, 0, 0, 0.05);353
transform: scale(0.9);354
user-select: none;356
&:hover {357
transition: transform 0.2s;358
transform: scale(1);359
}361
&.active {362
transform: scale(1);363
border: 3px solid #212121;364
}366
&::after {367
position: absolute;368
bottom: -20%;369
}370
}371
}372
}374
.toolbar {375
position: fixed;376
left: calc(50% - 210px);377
bottom: 30px;378
z-index: 2;379
display: flex;380
z-index: 999;382
.bucket {383
width: 56px;384
height: 56px;385
border-radius: 9999px;386
background: #CCC;387
margin: 7px;388
transition: transform 0.2s;389
box-shadow: 0 0px 8px 2px rgba(0, 0, 0, 0.05);390
cursor: pointer;391
transform: scale(0.9);392
user-select: none;394
&:hover {395
transition: transform 0.2s;396
transform: scale(1);397
}399
&.active {400
transform: scale(1.1);401
}402
}403
}405
.actions {406
position: fixed;407
top: 30px;408
left: 30px;409
display: flex;410
}412
.action {413
user-select: none;414
position: relative;415
width: 46px;416
height: 46px;417
border: none;418
border-radius: 9999px;419
background: transparent;420
cursor: pointer;421
outline: none;422
position: fixed;423
margin-right: 8px;425
i {426
color: #212121;427
user-select: none;428
pointer-events: none;429
}431
&:hover {432
background: #ECECEC;433
}435
&::after {436
bottom: -60%;437
}438
}440
.tooltip {441
position: relative;442
display: flex;443
justify-content: center;444
align-items: center;446
&:hover {448
&::before {449
opacity: 1;450
transition-delay: 0.6s;451
}453
&::after {454
opacity: 1;455
transition-delay: 0.6s;456
}457
}459
&::after {460
display: flex;461
opacity: 0;462
content: attr(data-title);463
justify-content: center;464
align-items: center;465
position: absolute;466
background: #212121;467
color: white;468
min-height: 24px;469
padding: 0 10px;470
border-radius: 4px;471
font-size: 12px;472
top: auto;473
bottom: -70%;474
white-space: nowrap;475
z-index: 9999;476
pointer-events: none;477
}479
&.up {481
&::before {482
top: ~'calc(-90% + 26px)';483
bottom: auto;484
border-left: 6px solid transparent;485
border-right: 6px solid transparent;486
border-top: 6px solid #212121;487
border-bottom: none;488
}490
&::after {491
top: -60%;492
bottom: auto;493
}494
}496
&.down {498
&::before {499
top: auto;500
bottom: ~'calc(-90% + 26px)';501
border-left: 6px solid transparent;502
border-right: 6px solid transparent;503
border-top: none;504
border-bottom: 6px solid #212121;505
}507
&::after {508
top: auto;509
bottom: -60%;510
}511
}512
}