A web-based drawing app
git clone git://soophie.de/outline
blob: 195e6c084d219c77d32c12fd9dc1607c1a8c4871 (8443 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: 9999;32
user-select: none;34
& > .info {35
position: fixed;36
right: 30px;37
bottom: 30px;38
display: flex;40
ul.info-list {41
display: flex;42
list-style-type: none;44
li.info-item {45
color: @color-dark;46
margin-left: 15px;47
user-select: none;48
font-weight: 500;50
a {51
user-select: none;52
color: @color-blue;53
text-decoration: none;55
&.subtle {56
color: @color-grey;57
}59
&:hover {60
text-decoration: underline;61
}62
}63
}64
}65
}66
}68
.spinner {69
width: 80px;70
height: 80px;71
border-radius: 40px;72
border: 10px solid rgba(255,255,255,0.2);73
border-top: 10px solid white;74
animation: spin 2s linear infinite;75
}77
@keyframes spin {78
0% { transform: rotate(0deg); }79
100% { transform: rotate(360deg); }80
}82
.modal {83
background: white;84
width: 400px;85
border-radius: 6px;86
padding: 20px;87
margin: 20px;88
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.03);90
&.modal-error {91
width: 300px;93
.align {94
justify-content: flex-end;95
}96
}98
&.theme-dark {99
background: @color-dark;100
color: white;102
button.action-cancel {103
background: @color-dark-grey;104
color: white;106
&:hover {107
background: lighten(@color-dark-grey, -2%);108
}109
}111
input[type="text"] {112
background: @color-black;113
color: white;115
&:hover {116
background: lighten(@color-black, -2%);117
}119
&:focus {120
background: lighten(@color-black, -2%);121
}122
}124
.separator {125
border-color: @color-dark-grey;126
}128
input[type="range"] {129
background: lighten(@color-black, 2%);130
}132
.preview {133
background: lighten(@color-black, 2%);134
}136
ul.avatar-list {138
li.avatar {139
border-color: @color-dark;140
background: lighten(@color-black, 1%);142
&:hover {143
border-color: lighten(@color-black, 3.5%);144
}145
}146
}147
}149
input.action-uuid,150
input.action-file {151
padding: 12px 14px;152
width: 100%;153
border: none;154
background: #FAFAFA;155
border-radius: 3px;156
font-size: 16px;157
user-select: none;158
margin-bottom: 3px;160
&:hover {161
background: #F8F8F8;162
}164
&:focus {165
background: #F5F5F5;166
}168
&.invalid {169
border-bottom: 3px solid #FF4A4A;170
border-radius: 3px 3px 0 0;171
margin-bottom: 0;172
}173
}175
.separator {176
border-top: 1px solid #F5F5F5;177
margin: 20px 0;178
}180
.align {181
display: flex;182
justify-content: space-between;183
align-items: center;184
}186
p {187
font-size: 18px;188
letter-spacing: 0.2px;189
padding-top: 5px;190
margin-bottom: 25px;191
}193
button {194
padding: 12px 14px;195
border: none;196
background: #F8F9FA;197
border-radius: 3px;198
font-size: 16px;199
cursor: pointer;200
user-select: none;201
transition: background 0.1s;202
color: #212121;204
&:hover {205
background: lighten(#F8F9FA, -5%);206
}208
&.success {209
background: #28A745;210
color: white;212
&:hover {213
background: lighten(#28A745, -5%);214
}215
}217
&.danger {218
background: #DC3545;219
color: white;221
&:hover {222
background: lighten(#DC3545, -5%);223
}224
}226
&.info {227
background: #007BFF;228
color: white;230
&:hover {231
background: lighten(#007BFF, -5%);232
}233
}234
}236
button.action-join {237
width: 100%;238
}240
button.action-cancel {241
width: calc(50% - 10px);242
}244
button.action-save,245
button.action-clear,246
button.action-background,247
button.action-scaling,248
button.action-color,249
button.action-default {250
width: calc(50% - 10px);251
}253
ul.avatar-list {254
display: flex;255
flex-wrap: wrap;256
width: 100%;257
list-style-type: none;259
li.avatar {260
background: #EEE;261
border-radius: 9999px;262
border: 5px solid white;263
margin: 10px;264
width: 70px;265
height: 70px;266
cursor: pointer;267
transition: border-color 0.1s;269
&:hover {270
border: 5px solid #F8F8F8;271
}272
}273
}275
input.action-range {276
width: calc(100% - 80px);277
-webkit-appearance: none;278
background: #F8F8F8;279
height: 6px;281
&:hover {282
background: #F5F5F5;284
&::-webkit-slider-thumb {285
background: lighten(#888888, -20%);286
}287
}289
&::-webkit-slider-thumb {290
-webkit-appearance: none;291
background: #888888;292
width: 20px;293
height: 20px;294
border-radius: 9999px;295
border: none;296
cursor: pointer;297
transition: background 0.1s;298
}300
&::-webkit-slider-runnable-track {301
-webkit-appearance: none;302
}303
}305
.preview {306
width: 60px;307
height: 60px;308
background: #F5F5F5;309
border-radius: 9999px;310
display: flex;311
justify-content: center;312
align-items: center;314
.circle {315
width: 12px;316
height: 12px;317
background: #212121;318
border-radius: 9999px;319
}320
}322
&.modal-color {323
width: 420px;324
position: relative;326
&:before {327
content: '';328
display: block;329
position: absolute;330
top: 20px;331
left: 20px;332
right: 26px;333
height: 10px;334
background: linear-gradient(white, transparent);335
z-index: 9;336
}338
&:after {339
content: '';340
display: block;341
position: absolute;342
bottom: 82px;343
left: 20px;344
right: 26px;345
height: 10px;346
background: linear-gradient(transparent, white);347
z-index: 9;348
}350
.bucket-list {351
display: flex;352
justify-content: center;353
max-height: 400px;354
overflow-x: hidden;355
overflow-y: auto;356
padding-top: 10px;357
padding-bottom: 10px;358
margin-bottom: 20px;360
&::-webkit-scrollbar {361
width: 6px;362
}364
&::-webkit-scrollbar-thumb {365
width: 6px;366
background: #EEE;368
&:hover {369
background: #CACACA;370
}371
}372
}374
.align {375
width: 100%;376
justify-content: flex-end;377
}378
}380
.bucket-list {381
display: flex;382
flex-wrap: wrap;383
width: 100%;384
list-style-type: none;386
.bucket {387
background: #EEE;388
border-radius: 9999px;389
margin: 5px;390
width: 60px;391
height: 60px;392
cursor: pointer;393
transition: transform 0.2s;394
box-shadow: 0 0px 8px 2px rgba(0, 0, 0, 0.05);396
transform: scale(0.9);397
user-select: none;399
&:hover {400
transition: transform 0.2s;401
transform: scale(1);402
}404
&.active {405
transform: scale(1);406
border: 3px solid #212121;407
}409
&::after {410
position: absolute;411
bottom: -20%;412
}413
}414
}415
}417
.toolbar {418
position: fixed;419
left: calc(50% - 210px);420
bottom: 30px;421
display: flex;422
z-index: 999;424
.bucket {425
width: 56px;426
height: 56px;427
border-radius: 9999px;428
background: #CCC;429
margin: 7px;430
transition: transform 0.2s;431
box-shadow: 0 0px 8px 2px rgba(0, 0, 0, 0.05);432
cursor: pointer;433
transform: scale(0.9);434
user-select: none;436
&:hover {437
transition: transform 0.2s;438
transform: scale(1);439
}441
&.active {442
transform: scale(1.1);443
}444
}445
}447
.actions {448
position: fixed;449
top: 30px;450
left: 30px;451
display: flex;452
}454
.action {455
user-select: none;456
position: relative;457
width: 46px;458
height: 46px;459
border: none;460
border-radius: 9999px;461
background: transparent;462
cursor: pointer;463
outline: none;464
position: fixed;465
margin-right: 8px;467
i {468
color: #212121;469
user-select: none;470
pointer-events: none;471
}473
&:hover {474
background: #ECECEC;475
}477
&::after {478
bottom: -60%;479
}480
}482
.tooltip {483
position: relative;484
display: flex;485
justify-content: center;486
align-items: center;488
&:hover {490
&::before {491
opacity: 1;492
transition-delay: 0.6s;493
}495
&::after {496
opacity: 1;497
transition-delay: 0.6s;498
}499
}501
&::after {502
display: flex;503
opacity: 0;504
content: attr(data-title);505
justify-content: center;506
align-items: center;507
position: absolute;508
background: #212121;509
color: white;510
min-height: 24px;511
padding: 0 10px;512
border-radius: 4px;513
font-size: 12px;514
top: auto;515
bottom: -70%;516
white-space: nowrap;517
z-index: 9999;518
pointer-events: none;519
}521
&.up {523
&::before {524
top: ~'calc(-90% + 26px)';525
bottom: auto;526
border-left: 6px solid transparent;527
border-right: 6px solid transparent;528
border-top: 6px solid #212121;529
border-bottom: none;530
}532
&::after {533
top: -60%;534
bottom: auto;535
}536
}538
&.down {540
&::before {541
top: auto;542
bottom: ~'calc(-90% + 26px)';543
border-left: 6px solid transparent;544
border-right: 6px solid transparent;545
border-top: none;546
border-bottom: 6px solid #212121;547
}549
&::after {550
top: auto;551
bottom: -60%;552
}553
}554
}