Skip to content

Commit fba4a7b

Browse files
committed
Add color legend to source file dialog header
1 parent ce8d00c commit fba4a7b

File tree

3 files changed

+48
-1
lines changed

3 files changed

+48
-1
lines changed

assets/stylesheets/screen.css

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,42 @@ dialog.source-dialog[open] {
630630
word-break: break-all;
631631
}
632632

633+
/* --- Source legend ------------------------------------------ */
634+
635+
.source-legend {
636+
display: flex;
637+
flex-wrap: wrap;
638+
gap: var(--sp-2) var(--sp-4);
639+
align-items: center;
640+
align-self: flex-end;
641+
flex-shrink: 0;
642+
margin-left: auto;
643+
padding-left: var(--sp-6);
644+
}
645+
646+
.source-legend__item {
647+
display: flex;
648+
align-items: center;
649+
gap: var(--sp-1);
650+
font-size: 13px;
651+
color: var(--text-secondary);
652+
white-space: nowrap;
653+
}
654+
655+
.source-legend__swatch {
656+
display: inline-block;
657+
width: 14px;
658+
height: 14px;
659+
border-radius: 3px;
660+
border: 1px solid var(--border);
661+
}
662+
663+
.source-legend__swatch--covered { background: var(--covered-bg); border-color: var(--covered-line-num-bg); }
664+
.source-legend__swatch--missed { background: var(--missed-bg); border-color: var(--missed-line-num-bg); }
665+
.source-legend__swatch--skipped { background: var(--skipped-bg); border-color: var(--skipped-line-num-bg); }
666+
.source-legend__swatch--missed-branch { background: var(--missed-branch-bg); border-color: var(--missed-branch-line-num-bg); }
667+
.source-legend__swatch--missed-method { background: var(--missed-method-bg); border-color: var(--missed-method-line-num-bg); }
668+
633669
.source-dialog__close {
634670
appearance: none;
635671
background: none;

0 commit comments

Comments
 (0)