so://phie

outline

A web-based drawing app
git clone git://soophie.de/outline

blob: 27790f867dcf50d8fac5c6bb1fdc8e09aaa44fb5 (9173 bytes)[doc][blame][raw]

1canvas.canvas {

2 position: relative;

3 z-index: 1;

4 cursor: none;

5 touch-action: none;

6}

7

8canvas.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}

18

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;

33

34 & > .info {

35 position: fixed;

36 right: 30px;

37 bottom: 30px;

38 display: flex;

39

40 ul.info-list {

41 display: flex;

42 list-style-type: none;

43

44 li.info-item {

45 color: @color-dark;

46 margin-left: 15px;

47 user-select: none;

48 font-weight: 500;

49

50 a {

51 user-select: none;

52 color: @color-blue;

53 text-decoration: none;

54

55 &.subtle {

56 color: @color-grey;

57 }

58

59 &:hover {

60 text-decoration: underline;

61 }

62 }

63 }

64 }

65 }

66}

67

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

76 &.theme-dark {

77 border: 10px solid rgba(0,0,0,0.2);

78 border-top: 10px solid @color-black;

79 }

80}

81

82@keyframes spin {

83 0% { transform: rotate(0deg); }

84 100% { transform: rotate(360deg); }

85}

86

87.modal {

88 background: white;

89 width: 400px;

90 border-radius: 6px;

91 padding: 20px;

92 margin: 20px;

93 box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.03);

94

95 &.modal-error {

96 width: 300px;

97

98 .align {

99 justify-content: flex-end;

100 }

101 }

102

103 &.theme-dark {

104 background: @color-dark;

105 color: white;

106

107 button.action-cancel {

108 background: lighten(@color-dark, 5%);

109 color: white;

110

111 &:hover {

112 background: lighten(@color-dark, 2%);

113 }

114 }

115

116 input[type="text"] {

117 background: @color-black;

118 color: white;

119

120 &:hover {

121 background: lighten(@color-black, -2%);

122 }

123

124 &:focus {

125 background: lighten(@color-black, -2%);

126 }

127 }

128

129 .separator {

130 border-color: lighten(@color-dark, 5%);

131 }

132

133 input[type="range"] {

134 background: lighten(@color-black, 2%);

135

136 &:hover {

137 background: @color-black;

138

139 &::-webkit-slider-thumb {

140 background: lighten(@color-dark, 2%);

141 }

142 }

143

144 &::-webkit-slider-thumb {

145 background: lighten(@color-dark, 5%);

146 }

147 }

148

149 .preview {

150 background: lighten(@color-black, 2%);

151 }

152

153 ul.avatar-list {

154

155 li.avatar {

156 border-color: @color-dark;

157 background: lighten(@color-black, 1%);

158

159 &:hover {

160 border-color: lighten(@color-black, 3.5%);

161 }

162 }

163 }

164

165 &.modal-color {

166

167 &:before {

168 background: linear-gradient(@color-dark, transparent);

169 }

170

171 &:after {

172 background: linear-gradient(transparent, @color-dark);

173 }

174

175 .bucket-list {

176

177 &::-webkit-scrollbar-thumb {

178 background: lighten(@color-black, 2%);

179

180 &:hover {

181 background: @color-black;

182 }

183 }

184 }

185 }

186 }

187

188 input.action-uuid,

189 input.action-file {

190 padding: 12px 14px;

191 width: 100%;

192 border: none;

193 background: #FAFAFA;

194 border-radius: 3px;

195 font-size: 16px;

196 user-select: none;

197 margin-bottom: 3px;

198

199 &:hover {

200 background: #F8F8F8;

201 }

202

203 &:focus {

204 background: #F5F5F5;

205 }

206

207 &.invalid {

208 border-bottom: 3px solid #FF4A4A;

209 border-radius: 3px 3px 0 0;

210 margin-bottom: 0;

211 }

212 }

213

214 .separator {

215 border-top: 1px solid #F5F5F5;

216 margin: 20px 0;

217 }

218

219 .align {

220 display: flex;

221 justify-content: space-between;

222 align-items: center;

223 }

224

225 p {

226 font-size: 18px;

227 letter-spacing: 0.2px;

228 padding-top: 5px;

229 margin-bottom: 25px;

230 }

231

232 button {

233 padding: 12px 14px;

234 border: none;

235 background: #F8F9FA;

236 border-radius: 3px;

237 font-size: 16px;

238 cursor: pointer;

239 user-select: none;

240 transition: background 0.1s;

241 color: #212121;

242

243 &:hover {

244 background: lighten(#F8F9FA, -5%);

245 }

246

247 &.success {

248 background: #28A745;

249 color: white;

250

251 &:hover {

252 background: lighten(#28A745, -5%);

253 }

254 }

255

256 &.danger {

257 background: #DC3545;

258 color: white;

259

260 &:hover {

261 background: lighten(#DC3545, -5%);

262 }

263 }

264

265 &.info {

266 background: #007BFF;

267 color: white;

268

269 &:hover {

270 background: lighten(#007BFF, -5%);

271 }

272 }

273 }

274

275 button.action-join {

276 width: 100%;

277 }

278

279 button.action-cancel {

280 width: calc(50% - 10px);

281 }

282

283 button.action-save,

284 button.action-clear,

285 button.action-background,

286 button.action-scaling,

287 button.action-color,

288 button.action-default {

289 width: calc(50% - 10px);

290 }

291

292 ul.avatar-list {

293 display: flex;

294 flex-wrap: wrap;

295 width: 100%;

296 list-style-type: none;

297

298 li.avatar {

299 background: #EEE;

300 border-radius: 9999px;

301 border: 5px solid white;

302 margin: 10px;

303 width: 70px;

304 height: 70px;

305 cursor: pointer;

306 transition: border-color 0.1s;

307

308 &:hover {

309 border: 5px solid #F8F8F8;

310 }

311 }

312 }

313

314 input.action-range {

315 width: calc(100% - 80px);

316 -webkit-appearance: none;

317 background: #F8F8F8;

318 height: 6px;

319

320 &:hover {

321 background: #F5F5F5;

322

323 &::-webkit-slider-thumb {

324 background: lighten(#888888, -20%);

325 }

326 }

327

328 &::-webkit-slider-thumb {

329 -webkit-appearance: none;

330 background: #888888;

331 width: 20px;

332 height: 20px;

333 border-radius: 9999px;

334 border: none;

335 cursor: pointer;

336 transition: background 0.1s;

337 }

338

339 &::-webkit-slider-runnable-track {

340 -webkit-appearance: none;

341 }

342 }

343

344 .preview {

345 width: 60px;

346 height: 60px;

347 background: #F5F5F5;

348 border-radius: 9999px;

349 display: flex;

350 justify-content: center;

351 align-items: center;

352

353 .circle {

354 width: 12px;

355 height: 12px;

356 background: #212121;

357 border-radius: 9999px;

358 }

359 }

360

361 &.modal-color {

362 width: 420px;

363 position: relative;

364

365 &:before {

366 content: '';

367 display: block;

368 position: absolute;

369 top: 20px;

370 left: 20px;

371 right: 26px;

372 height: 10px;

373 background: linear-gradient(white, transparent);

374 z-index: 9;

375 }

376

377 &:after {

378 content: '';

379 display: block;

380 position: absolute;

381 bottom: 82px;

382 left: 20px;

383 right: 26px;

384 height: 10px;

385 background: linear-gradient(transparent, white);

386 z-index: 9;

387 }

388

389 .bucket-list {

390 display: flex;

391 justify-content: center;

392 max-height: 400px;

393 overflow-x: hidden;

394 overflow-y: auto;

395 padding-top: 10px;

396 padding-bottom: 10px;

397 margin-bottom: 20px;

398

399 &::-webkit-scrollbar {

400 width: 6px;

401 }

402

403 &::-webkit-scrollbar-thumb {

404 width: 6px;

405 background: #EEE;

406

407 &:hover {

408 background: #CACACA;

409 }

410 }

411 }

412

413 .align {

414 width: 100%;

415 justify-content: flex-end;

416 }

417 }

418

419 .bucket-list {

420 display: flex;

421 flex-wrap: wrap;

422 width: 100%;

423 list-style-type: none;

424

425 .bucket {

426 background: #EEE;

427 border-radius: 9999px;

428 margin: 5px;

429 width: 60px;

430 height: 60px;

431 cursor: pointer;

432 transition: transform 0.2s;

433 box-shadow: 0 0px 8px 2px rgba(0, 0, 0, 0.05);

434

435 transform: scale(0.9);

436 user-select: none;

437

438 &:hover {

439 transition: transform 0.2s;

440 transform: scale(1);

441 }

442

443 &.active {

444 transform: scale(1);

445 border: 3px solid #212121;

446 }

447

448 &::after {

449 position: absolute;

450 bottom: -20%;

451 }

452 }

453 }

454}

455

456.toolbar {

457 position: fixed;

458 left: calc(50% - 210px);

459 bottom: 30px;

460 display: flex;

461 z-index: 999;

462

463 .bucket {

464 width: 56px;

465 height: 56px;

466 border-radius: 9999px;

467 background: #CCC;

468 margin: 7px;

469 transition: transform 0.2s;

470 box-shadow: 0 0px 8px 2px rgba(0, 0, 0, 0.05);

471 cursor: pointer;

472 transform: scale(0.9);

473 user-select: none;

474

475 &:hover {

476 transition: transform 0.2s;

477 transform: scale(1);

478 }

479

480 &.active {

481 transform: scale(1.1);

482 }

483 }

484}

485

486.infobar {

487 position: fixed;

488 top: 30px;

489 right: 30px;

490 display: flex;

491}

492

493.actions {

494 position: fixed;

495 top: 30px;

496 left: 30px;

497 display: flex;

498}

499

500.action {

501 user-select: none;

502 position: relative;

503 width: 46px;

504 height: 46px;

505 border: none;

506 border-radius: 9999px;

507 background: transparent;

508 cursor: pointer;

509 outline: none;

510 position: fixed;

511 margin-right: 8px;

512

513 i {

514 color: #212121;

515 user-select: none;

516 pointer-events: none;

517 }

518

519 &:hover {

520 background: #ECECEC;

521 }

522

523 &::after {

524 bottom: -60%;

525 }

526}

527

528.tooltip {

529 position: relative;

530 display: flex;

531 justify-content: center;

532 align-items: center;

533

534 &:hover {

535

536 &::before {

537 opacity: 1;

538 transition-delay: 0.6s;

539 }

540

541 &::after {

542 opacity: 1;

543 transition-delay: 0.6s;

544 }

545 }

546

547 &::after {

548 display: flex;

549 opacity: 0;

550 content: attr(data-title);

551 justify-content: center;

552 align-items: center;

553 position: absolute;

554 background: #212121;

555 color: white;

556 min-height: 24px;

557 padding: 0 10px;

558 border-radius: 4px;

559 font-size: 12px;

560 top: auto;

561 bottom: -70%;

562 white-space: nowrap;

563 z-index: 9999;

564 pointer-events: none;

565 }

566

567 &.up {

568

569 &::before {

570 top: ~'calc(-90% + 26px)';

571 bottom: auto;

572 border-left: 6px solid transparent;

573 border-right: 6px solid transparent;

574 border-top: 6px solid #212121;

575 border-bottom: none;

576 }

577

578 &::after {

579 top: -60%;

580 bottom: auto;

581 }

582 }

583

584 &.down {

585

586 &::before {

587 top: auto;

588 bottom: ~'calc(-90% + 26px)';

589 border-left: 6px solid transparent;

590 border-right: 6px solid transparent;

591 border-top: none;

592 border-bottom: 6px solid #212121;

593 }

594

595 &::after {

596 top: auto;

597 bottom: -60%;

598 }

599 }

600}