so://phie

outline

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

blob: e8ff28ef2d42907b0de5a050fe17463aaaf816c4 (8429 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

77@keyframes spin {

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

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

80}

81

82.modal {

83 background: white;

84 width: 400px;

85 border-radius: 6px;

86 padding: 20px;

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

88

89 &.modal-error {

90 width: 300px;

91

92 .align {

93 justify-content: flex-end;

94 }

95 }

96

97 &.theme-dark {

98 background: @color-dark;

99 color: white;

100

101 button.action-cancel {

102 background: @color-dark-grey;

103 color: white;

104

105 &:hover {

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

107 }

108 }

109

110 input[type="text"] {

111 background: @color-black;

112 color: white;

113

114 &:hover {

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

116 }

117

118 &:focus {

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

120 }

121 }

122

123 .separator {

124 border-color: @color-dark-grey;

125 }

126

127 input[type="range"] {

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

129 }

130

131 .preview {

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

133 }

134

135 ul.avatar-list {

136

137 li.avatar {

138 border-color: @color-dark;

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

140

141 &:hover {

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

143 }

144 }

145 }

146 }

147

148 input.action-uuid,

149 input.action-file {

150 padding: 12px 14px;

151 width: 100%;

152 border: none;

153 background: #FAFAFA;

154 border-radius: 3px;

155 font-size: 16px;

156 user-select: none;

157 margin-bottom: 3px;

158

159 &:hover {

160 background: #F8F8F8;

161 }

162

163 &:focus {

164 background: #F5F5F5;

165 }

166

167 &.invalid {

168 border-bottom: 3px solid #FF4A4A;

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

170 margin-bottom: 0;

171 }

172 }

173

174 .separator {

175 border-top: 1px solid #F5F5F5;

176 margin: 20px 0;

177 }

178

179 .align {

180 display: flex;

181 justify-content: space-between;

182 align-items: center;

183 }

184

185 p {

186 font-size: 18px;

187 letter-spacing: 0.2px;

188 padding-top: 5px;

189 margin-bottom: 25px;

190 }

191

192 button {

193 padding: 12px 14px;

194 border: none;

195 background: #F8F9FA;

196 border-radius: 3px;

197 font-size: 16px;

198 cursor: pointer;

199 user-select: none;

200 transition: background 0.1s;

201 color: #212121;

202

203 &:hover {

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

205 }

206

207 &.success {

208 background: #28A745;

209 color: white;

210

211 &:hover {

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

213 }

214 }

215

216 &.danger {

217 background: #DC3545;

218 color: white;

219

220 &:hover {

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

222 }

223 }

224

225 &.info {

226 background: #007BFF;

227 color: white;

228

229 &:hover {

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

231 }

232 }

233 }

234

235 button.action-join {

236 width: 100%;

237 }

238

239 button.action-cancel {

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

241 }

242

243 button.action-save,

244 button.action-clear,

245 button.action-background,

246 button.action-scaling,

247 button.action-color,

248 button.action-default {

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

250 }

251

252 ul.avatar-list {

253 display: flex;

254 flex-wrap: wrap;

255 width: 100%;

256 list-style-type: none;

257

258 li.avatar {

259 background: #EEE;

260 border-radius: 9999px;

261 border: 5px solid white;

262 margin: 10px;

263 width: 70px;

264 height: 70px;

265 cursor: pointer;

266 transition: border-color 0.1s;

267

268 &:hover {

269 border: 5px solid #F8F8F8;

270 }

271 }

272 }

273

274 input.action-range {

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

276 -webkit-appearance: none;

277 background: #F8F8F8;

278 height: 6px;

279

280 &:hover {

281 background: #F5F5F5;

282

283 &::-webkit-slider-thumb {

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

285 }

286 }

287

288 &::-webkit-slider-thumb {

289 -webkit-appearance: none;

290 background: #888888;

291 width: 20px;

292 height: 20px;

293 border-radius: 9999px;

294 border: none;

295 cursor: pointer;

296 transition: background 0.1s;

297 }

298

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

300 -webkit-appearance: none;

301 }

302 }

303

304 .preview {

305 width: 60px;

306 height: 60px;

307 background: #F5F5F5;

308 border-radius: 9999px;

309 display: flex;

310 justify-content: center;

311 align-items: center;

312

313 .circle {

314 width: 12px;

315 height: 12px;

316 background: #212121;

317 border-radius: 9999px;

318 }

319 }

320

321 &.modal-color {

322 width: 420px;

323 position: relative;

324

325 &:before {

326 content: '';

327 display: block;

328 position: absolute;

329 top: 20px;

330 left: 20px;

331 right: 26px;

332 height: 10px;

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

334 z-index: 9;

335 }

336

337 &:after {

338 content: '';

339 display: block;

340 position: absolute;

341 bottom: 82px;

342 left: 20px;

343 right: 26px;

344 height: 10px;

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

346 z-index: 9;

347 }

348

349 .bucket-list {

350 display: flex;

351 justify-content: center;

352 max-height: 400px;

353 overflow-x: hidden;

354 overflow-y: auto;

355 padding-top: 10px;

356 padding-bottom: 10px;

357 margin-bottom: 20px;

358

359 &::-webkit-scrollbar {

360 width: 6px;

361 }

362

363 &::-webkit-scrollbar-thumb {

364 width: 6px;

365 background: #EEE;

366

367 &:hover {

368 background: #CACACA;

369 }

370 }

371 }

372

373 .align {

374 width: 100%;

375 justify-content: flex-end;

376 }

377 }

378

379 .bucket-list {

380 display: flex;

381 flex-wrap: wrap;

382 width: 100%;

383 list-style-type: none;

384

385 .bucket {

386 background: #EEE;

387 border-radius: 9999px;

388 margin: 10px;

389 width: 70px;

390 height: 70px;

391 cursor: pointer;

392 transition: transform 0.2s;

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

394

395 transform: scale(0.9);

396 user-select: none;

397

398 &:hover {

399 transition: transform 0.2s;

400 transform: scale(1);

401 }

402

403 &.active {

404 transform: scale(1);

405 border: 3px solid #212121;

406 }

407

408 &::after {

409 position: absolute;

410 bottom: -20%;

411 }

412 }

413 }

414}

415

416.toolbar {

417 position: fixed;

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

419 bottom: 30px;

420 display: flex;

421 z-index: 999;

422

423 .bucket {

424 width: 56px;

425 height: 56px;

426 border-radius: 9999px;

427 background: #CCC;

428 margin: 7px;

429 transition: transform 0.2s;

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

431 cursor: pointer;

432 transform: scale(0.9);

433 user-select: none;

434

435 &:hover {

436 transition: transform 0.2s;

437 transform: scale(1);

438 }

439

440 &.active {

441 transform: scale(1.1);

442 }

443 }

444}

445

446.actions {

447 position: fixed;

448 top: 30px;

449 left: 30px;

450 display: flex;

451}

452

453.action {

454 user-select: none;

455 position: relative;

456 width: 46px;

457 height: 46px;

458 border: none;

459 border-radius: 9999px;

460 background: transparent;

461 cursor: pointer;

462 outline: none;

463 position: fixed;

464 margin-right: 8px;

465

466 i {

467 color: #212121;

468 user-select: none;

469 pointer-events: none;

470 }

471

472 &:hover {

473 background: #ECECEC;

474 }

475

476 &::after {

477 bottom: -60%;

478 }

479}

480

481.tooltip {

482 position: relative;

483 display: flex;

484 justify-content: center;

485 align-items: center;

486

487 &:hover {

488

489 &::before {

490 opacity: 1;

491 transition-delay: 0.6s;

492 }

493

494 &::after {

495 opacity: 1;

496 transition-delay: 0.6s;

497 }

498 }

499

500 &::after {

501 display: flex;

502 opacity: 0;

503 content: attr(data-title);

504 justify-content: center;

505 align-items: center;

506 position: absolute;

507 background: #212121;

508 color: white;

509 min-height: 24px;

510 padding: 0 10px;

511 border-radius: 4px;

512 font-size: 12px;

513 top: auto;

514 bottom: -70%;

515 white-space: nowrap;

516 z-index: 9999;

517 pointer-events: none;

518 }

519

520 &.up {

521

522 &::before {

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

524 bottom: auto;

525 border-left: 6px solid transparent;

526 border-right: 6px solid transparent;

527 border-top: 6px solid #212121;

528 border-bottom: none;

529 }

530

531 &::after {

532 top: -60%;

533 bottom: auto;

534 }

535 }

536

537 &.down {

538

539 &::before {

540 top: auto;

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

542 border-left: 6px solid transparent;

543 border-right: 6px solid transparent;

544 border-top: none;

545 border-bottom: 6px solid #212121;

546 }

547

548 &::after {

549 top: auto;

550 bottom: -60%;

551 }

552 }

553}