Skip to content

Commit 0108a57

Browse files
authored
Update timeline workflow status colors (#2143)
* Update colors to match workflow status colors * Ignore theme function in stylelintrc
1 parent 3d8566c commit 0108a57

File tree

2 files changed

+102
-70
lines changed

2 files changed

+102
-70
lines changed

.stylelintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
]
2929
}
3030
],
31+
"function-no-unknown": [
32+
true,
33+
{
34+
"ignoreFunctions": ["theme"]
35+
}
36+
],
3137
"custom-property-pattern": null,
3238
"declaration-block-no-redundant-longhand-properties": [
3339
true,

src/lib/components/event/event-history-timeline.svelte

Lines changed: 96 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -346,15 +346,15 @@
346346
347347
:global(.vis-time-axis .vis-text) {
348348
font-size: 10px;
349-
color: white !important;
349+
color: theme(colors.white) !important;
350350
}
351351
352352
:global(.vis-background, .vis-timeline) {
353-
background-color: #000;
354-
color: white;
353+
background-color: theme(colors.black);
354+
color: theme(colors.white);
355355
border-radius: 0.75rem;
356356
border-width: 2px;
357-
border: 2px solid #000;
357+
border: 2px solid theme(colors.black);
358358
}
359359
360360
:global(.vis-content, .vis-group) {
@@ -367,19 +367,19 @@
367367
}
368368
369369
:global(.vis-item.vis-dot) {
370-
background-color: #18181b;
370+
background-color: theme(colors.off-black);
371371
}
372372
373373
:global(.vis-item-overflow) {
374374
overflow: visible !important;
375375
}
376376
377377
:global(.vis-tooltip) {
378-
background-color: #18181b !important;
378+
background-color: theme(colors.off-black) !important;
379379
color: white !important;
380380
border-radius: 0.75rem !important;
381381
border-width: 2px !important;
382-
border: 2px solid #18181b !important;
382+
border: 2px solid theme(colors.off-black) !important;
383383
height: auto !important;
384384
font-size: 0.5em !important;
385385
}
@@ -390,85 +390,111 @@
390390
391391
/* CSS for each activity type block */
392392
:global(.vis-item.vis-range.workflow) {
393-
background-color: #f4f4f5;
394-
border-color: #18181b;
393+
background-color: theme(colors.off-white);
394+
border-color: theme(colors.off-black);
395395
border-radius: 9999px;
396396
border-width: 2px;
397-
color: #18181b;
397+
color: theme(colors.black);
398398
}
399399
400400
:global(.vis-item.vis-point.workflow) {
401-
background-color: #18181b;
402-
color: #18181b;
401+
background-color: theme(colors.off-black);
402+
color: theme(colors.off-black);
403403
}
404404
405405
/* CSS for each classifciation */
406-
:global(.vis-item.vis-range.Failed, .vis-item.vis-range.Terminated) {
407-
background-color: #fee2e2;
408-
border-color: #b91c1c;
406+
:global(.vis-item.vis-range.Failed) {
407+
background-color: theme(colors.red.300);
408+
border-color: theme(colors.red.300);
409+
border-radius: 9999px;
410+
border-width: 2px;
411+
color: theme(colors.black);
412+
}
413+
414+
:global(.vis-item.vis-point.Failed) {
415+
color: theme(colors.red.300);
416+
}
417+
418+
:global(.vis-item.vis-range.Terminated, .vis-item.vis-range.CancelRequested) {
419+
background-color: theme(colors.yellow.300);
420+
border-color: theme(colors.yellow.300);
409421
border-radius: 9999px;
410422
border-width: 2px;
411-
color: #b91c1c;
423+
color: theme(colors.black);
412424
}
413425
414-
:global(.vis-item.vis-point.Failed, .vis-item.vis-range.Terminated) {
415-
color: #b91c1c;
426+
:global(.vis-item.vis-point.Terminated, .vis-item.vis-point.CancelRequested) {
427+
color: theme(colors.yellow.300);
416428
}
417429
418430
:global(.vis-item.vis-range.TimedOut) {
419-
background-color: #ffedd5;
420-
border-color: #c2410c;
431+
background-color: theme(colors.orange.300);
432+
border-color: theme(colors.orange.300);
421433
border-radius: 9999px;
422434
border-width: 2px;
423-
color: #c2410c;
435+
color: theme(colors.black);
424436
}
425437
426438
:global(.vis-item.vis-point.TimedOut) {
427-
color: #c2410c;
439+
color: theme(colors.orange.300);
428440
}
429441
430-
:global(
431-
.vis-item.vis-range.Canceled,
432-
.vis-item.vis-range.CanceledRequested,
433-
.vis-item.vis-range.Paused
434-
) {
435-
background-color: #fef9c3;
436-
border-color: #a16207;
442+
:global(.vis-item.vis-range.Canceled, .vis-item.vis-range.Unspecified) {
443+
background-color: theme(colors.slate.100);
444+
border-color: theme(colors.slate.100);
437445
border-radius: 9999px;
438446
border-width: 2px;
439-
color: #a16207;
447+
color: theme(colors.black);
440448
}
441449
442-
:global(
443-
.vis-item.vis-point.Canceled,
444-
.vis-item.vis-point.CanceledRequested,
445-
.vis-item.vis-point.Paused
446-
) {
447-
color: #a16207;
450+
:global(.vis-item.vis-point.Canceled, .vis-item.vis-point.Unspecified) {
451+
color: theme(colors.slate.100);
452+
}
453+
454+
:global(.vis-item.vis-range.Fired) {
455+
background-color: theme(colors.pink.300);
456+
border-color: theme(colors.pink.300);
457+
border-radius: 9999px;
458+
border-width: 2px;
459+
color: theme(colors.black);
460+
}
461+
462+
:global(.vis-item.vis-point.Fired) {
463+
color: theme(colors.pink.300);
464+
}
465+
466+
:global(.vis-item.vis-range.Scheduled) {
467+
background-color: theme(colors.indigo.300);
468+
border-color: theme(colors.indigo.300);
469+
border-radius: 9999px;
470+
border-width: 2px;
471+
color: theme(colors.black);
472+
}
473+
474+
:global(.vis-item.vis-point.Scheduled) {
475+
color: theme(colors.indigo.300);
448476
}
449477
450478
:global(
451479
.vis-item.vis-range.Running,
452-
.vis-item.vis-range.Fired,
453-
.vis-item.vis-range.Scheduled,
480+
.vis-item.vis-range.New,
454481
.vis-item.vis-range.Started,
455482
.vis-item.vis-range.Initiated
456483
) {
457-
background-color: #93bbfd;
458-
border-color: #1d4ed8;
484+
background-color: theme(colors.blue.300);
485+
border-color: theme(colors.blue.300);
459486
border-radius: 9999px;
460487
border-width: 2px;
461-
color: #000;
488+
color: theme(colors.black);
462489
}
463490
464491
:global(
465492
.vis-item.vis-point.Running,
466-
.vis-item.vis-point.Fired,
467-
.vis-item.vis-point.Scheduled,
493+
.vis-item.vis-point.New,
468494
.vis-item.vis-point.Started,
469495
.vis-item.vis-point.Initiated
470496
) {
471-
color: #1d4ed8;
497+
color: theme(colors.blue.300);
472498
}
473499
474500
:global(.vis-item.vis-range.workflow.Running) {
@@ -478,72 +504,72 @@
478504
}
479505
480506
:global(.vis-item.vis-range.ContinuedAsNew) {
481-
background-color: #e4e4e7;
482-
border-color: #18181b;
507+
background-color: theme(colors.purple.300);
508+
border-color: theme(colors.purple.300);
483509
border-radius: 9999px;
484510
border-width: 2px;
485-
color: #17172c;
511+
color: theme(colors.black);
486512
}
487513
488514
:global(.vis-item.vis-point.ContinuedAsNew) {
489-
color: #18181b;
515+
color: theme(colors.purple.300);
490516
}
491517
492518
:global(.vis-item.vis-range.Completed, .vis-item.vis-range.Open) {
493-
background-color: #dcfce7;
494-
border-color: #15803d;
519+
background-color: #71d375;
520+
border-color: #71d375;
495521
border-radius: 9999px;
496522
border-width: 2px;
497-
color: #15803d;
523+
color: theme(colors.black);
498524
}
499525
500526
:global(.vis-item.vis-point.Completed, .vis-item.vis-point.Open) {
501-
color: #15803d;
527+
color: #71d375;
502528
}
503529
504-
:global(.vis-item.vis-range.New) {
505-
background-color: #e0eaff;
506-
border-color: #4338ca;
530+
:global(.vis-item.vis-range.Signaled) {
531+
background-color: theme(colors.pink.200);
532+
border-color: theme(colors.pink.200);
507533
border-radius: 9999px;
508534
border-width: 2px;
509-
color: #4338ca;
535+
color: theme(colors.black);
510536
}
511537
512-
:global(.vis-item.vis-point.New) {
513-
color: #4338ca;
538+
:global(.vis-item.vis-point.Signaled) {
539+
color: theme(colors.pink.200);
514540
}
515541
516-
:global(.vis-item.vis-range.Signaled) {
517-
background-color: #f3e8ff;
518-
border-color: #7e22ce;
542+
:global(.vis-item.vis-range.Paused) {
543+
background-color: theme(colors.yellow.200);
544+
border-color: theme(colors.yellow.200);
519545
border-radius: 9999px;
520546
border-width: 2px;
521-
color: #7e22ce;
547+
color: theme(colors.black);
522548
}
523549
524-
:global(.vis-item.vis-point.Signaled) {
525-
color: #7e22ce;
550+
:global(.vis-item.vis-point.Paused) {
551+
color: theme(colors.yellow.200);
526552
}
527553
528554
/* CSS for each activity type */
529555
:global(.vis-item.vis-dot.marker) {
530-
border-color: #18181b;
556+
border-color: theme(colors.off-black);
531557
}
532558
533559
:global(.vis-item.vis-range.signal) {
534-
color: #652b19;
560+
color: theme(colors.orange.900);
535561
}
536562
537563
:global(.vis-item.vis-point.signal) {
538-
color: #652b19;
564+
color: theme(colors.orange.900);
539565
}
540566
541567
:global(.vis-item.vis-range.update) {
542-
background-color: #f3e8ff;
543-
border-color: #581c87;
568+
background-color: theme(colors.purple.100);
569+
border-color: theme(colors.purple.900);
544570
border-radius: 9999px;
545571
border-width: 2px;
546-
color: #581c87;
572+
color: theme(colors.purple.900);
547573
}
548574
549575
:global(.bar-content) {

0 commit comments

Comments
 (0)