so://phie

outline

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

blob: 5e14201619aad5a3f2d9acd423956d4248ecf81d (7848 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: 99999;

32 user-select: none;

33}

34

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}

43

44@keyframes spin {

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

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

47}

48

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);

55

56 &.modal-error {

57 width: 300px;

58

59 .align {

60 justify-content: flex-end;

61 }

62 }

63

64 &.theme-dark {

65 background: @color-dark;

66 color: white;

67

68 button.action-cancel {

69 background: @color-dark-grey;

70 color: white;

71

72 &:hover {

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

74 }

75 }

76

77 input[type="text"] {

78 background: @color-black;

79 color: white;

80

81 &:hover {

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

83 }

84

85 &:focus {

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

87 }

88 }

89

90 .separator {

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

92 }

93

94 input[type="range"] {

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

96 }

97

98 .preview {

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

100 }

101

102 ul.avatar-list {

103

104 li.avatar {

105 border-color: @color-dark;

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

107

108 &:hover {

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

110 }

111 }

112 }

113 }

114

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;

124

125 &:hover {

126 background: #F8F8F8;

127 }

128

129 &:focus {

130 background: #F5F5F5;

131 }

132 }

133

134 .separator {

135 border-top: 1px solid #F5F5F5;

136 margin: 20px 0;

137 }

138

139 .align {

140 display: flex;

141 justify-content: space-between;

142 align-items: center;

143 }

144

145 p {

146 font-size: 18px;

147 letter-spacing: 0.2px;

148 padding-top: 5px;

149 margin-bottom: 25px;

150 }

151

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;

162

163 &:hover {

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

165 }

166

167 &.success {

168 background: #28A745;

169 color: white;

170

171 &:hover {

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

173 }

174 }

175

176 &.danger {

177 background: #DC3545;

178 color: white;

179

180 &:hover {

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

182 }

183 }

184

185 &.info {

186 background: #007BFF;

187 color: white;

188

189 &:hover {

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

191 }

192 }

193 }

194

195 button.action-join {

196 width: 100%;

197 }

198

199 button.action-cancel {

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

201 }

202

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 }

211

212 ul.avatar-list {

213 display: flex;

214 flex-wrap: wrap;

215 width: 100%;

216 list-style-type: none;

217

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;

227

228 &:hover {

229 border: 5px solid #F8F8F8;

230 }

231 }

232 }

233

234 input.action-range {

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

236 -webkit-appearance: none;

237 background: #F8F8F8;

238 height: 6px;

239

240 &:hover {

241 background: #F5F5F5;

242

243 &::-webkit-slider-thumb {

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

245 }

246 }

247

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 }

258

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

260 -webkit-appearance: none;

261 }

262 }

263

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;

272

273 .circle {

274 width: 12px;

275 height: 12px;

276 background: #212121;

277 border-radius: 9999px;

278 }

279 }

280

281 &.modal-color {

282 width: 420px;

283 position: relative;

284

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 }

296

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 }

308

309 .bucket-list {

310 display: flex;

311 justify-content: center;

312 max-height: 400px;

313 overflow-x: hidden;

314 overflow-y: auto;

315 padding-top: 10px;

316 padding-bottom: 10px;

317 margin-bottom: 20px;

318

319 &::-webkit-scrollbar {

320 width: 6px;

321 }

322

323 &::-webkit-scrollbar-thumb {

324 width: 6px;

325 background: #EEE;

326

327 &:hover {

328 background: #CACACA;

329 }

330 }

331 }

332

333 .align {

334 width: 100%;

335 justify-content: flex-end;

336 }

337 }

338

339 .bucket-list {

340 display: flex;

341 flex-wrap: wrap;

342 width: 100%;

343 list-style-type: none;

344

345 .bucket {

346 background: #EEE;

347 border-radius: 9999px;

348 margin: 10px;

349 width: 70px;

350 height: 70px;

351 cursor: pointer;

352 transition: transform 0.2s;

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

354

355 transform: scale(0.9);

356 user-select: none;

357

358 &:hover {

359 transition: transform 0.2s;

360 transform: scale(1);

361 }

362

363 &.active {

364 transform: scale(1);

365 border: 3px solid #212121;

366 }

367

368 &::after {

369 position: absolute;

370 bottom: -20%;

371 }

372 }

373 }

374}

375

376.toolbar {

377 position: fixed;

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

379 bottom: 30px;

380 z-index: 2;

381 display: flex;

382 z-index: 999;

383

384 .bucket {

385 width: 56px;

386 height: 56px;

387 border-radius: 9999px;

388 background: #CCC;

389 margin: 7px;

390 transition: transform 0.2s;

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

392 cursor: pointer;

393 transform: scale(0.9);

394 user-select: none;

395

396 &:hover {

397 transition: transform 0.2s;

398 transform: scale(1);

399 }

400

401 &.active {

402 transform: scale(1.1);

403 }

404 }

405}

406

407.actions {

408 position: fixed;

409 top: 30px;

410 left: 30px;

411 display: flex;

412}

413

414.action {

415 user-select: none;

416 position: relative;

417 width: 46px;

418 height: 46px;

419 border: none;

420 border-radius: 9999px;

421 background: transparent;

422 cursor: pointer;

423 outline: none;

424 position: fixed;

425 margin-right: 8px;

426

427 i {

428 color: #212121;

429 user-select: none;

430 pointer-events: none;

431 }

432

433 &:hover {

434 background: #ECECEC;

435 }

436

437 &::after {

438 bottom: -60%;

439 }

440}

441

442.tooltip {

443 position: relative;

444 display: flex;

445 justify-content: center;

446 align-items: center;

447

448 &:hover {

449

450 &::before {

451 opacity: 1;

452 transition-delay: 0.6s;

453 }

454

455 &::after {

456 opacity: 1;

457 transition-delay: 0.6s;

458 }

459 }

460

461 &::after {

462 display: flex;

463 opacity: 0;

464 content: attr(data-title);

465 justify-content: center;

466 align-items: center;

467 position: absolute;

468 background: #212121;

469 color: white;

470 min-height: 24px;

471 padding: 0 10px;

472 border-radius: 4px;

473 font-size: 12px;

474 top: auto;

475 bottom: -70%;

476 white-space: nowrap;

477 z-index: 9999;

478 pointer-events: none;

479 }

480

481 &.up {

482

483 &::before {

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

485 bottom: auto;

486 border-left: 6px solid transparent;

487 border-right: 6px solid transparent;

488 border-top: 6px solid #212121;

489 border-bottom: none;

490 }

491

492 &::after {

493 top: -60%;

494 bottom: auto;

495 }

496 }

497

498 &.down {

499

500 &::before {

501 top: auto;

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

503 border-left: 6px solid transparent;

504 border-right: 6px solid transparent;

505 border-top: none;

506 border-bottom: 6px solid #212121;

507 }

508

509 &::after {

510 top: auto;

511 bottom: -60%;

512 }

513 }

514}