so://phie

outline

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

blob: ce67ccb663384e5ceaf882d3651df2e92fd44cdf (9099 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.actions {

487 position: fixed;

488 top: 30px;

489 left: 30px;

490 display: flex;

491}

492

493.action {

494 user-select: none;

495 position: relative;

496 width: 46px;

497 height: 46px;

498 border: none;

499 border-radius: 9999px;

500 background: transparent;

501 cursor: pointer;

502 outline: none;

503 position: fixed;

504 margin-right: 8px;

505

506 i {

507 color: #212121;

508 user-select: none;

509 pointer-events: none;

510 }

511

512 &:hover {

513 background: #ECECEC;

514 }

515

516 &::after {

517 bottom: -60%;

518 }

519}

520

521.tooltip {

522 position: relative;

523 display: flex;

524 justify-content: center;

525 align-items: center;

526

527 &:hover {

528

529 &::before {

530 opacity: 1;

531 transition-delay: 0.6s;

532 }

533

534 &::after {

535 opacity: 1;

536 transition-delay: 0.6s;

537 }

538 }

539

540 &::after {

541 display: flex;

542 opacity: 0;

543 content: attr(data-title);

544 justify-content: center;

545 align-items: center;

546 position: absolute;

547 background: #212121;

548 color: white;

549 min-height: 24px;

550 padding: 0 10px;

551 border-radius: 4px;

552 font-size: 12px;

553 top: auto;

554 bottom: -70%;

555 white-space: nowrap;

556 z-index: 9999;

557 pointer-events: none;

558 }

559

560 &.up {

561

562 &::before {

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

564 bottom: auto;

565 border-left: 6px solid transparent;

566 border-right: 6px solid transparent;

567 border-top: 6px solid #212121;

568 border-bottom: none;

569 }

570

571 &::after {

572 top: -60%;

573 bottom: auto;

574 }

575 }

576

577 &.down {

578

579 &::before {

580 top: auto;

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

582 border-left: 6px solid transparent;

583 border-right: 6px solid transparent;

584 border-top: none;

585 border-bottom: 6px solid #212121;

586 }

587

588 &::after {

589 top: auto;

590 bottom: -60%;

591 }

592 }

593}