extract mixin for octicon status colourings

This commit is contained in:
Brendan Forster 2017-02-08 11:36:05 +01:00
parent a372cc5b5f
commit d985f1437b
4 changed files with 14 additions and 15 deletions

View file

@ -1,3 +1,4 @@
@import "mixins/platform";
@import "mixins/window";
@import "mixins/ellipsis";
@import "mixins/octicon-status";

View file

@ -0,0 +1,9 @@
@mixin octicon-status {
.status {
&-new { fill: var(--color-new); }
&-copied { fill: var(--color-new); }
&-modified { fill: var(--color-modified); }
&-renamed { fill: var(--color-modified); }
&-deleted { fill: var(--color-deleted); }
}
}

View file

@ -1,3 +1,5 @@
@import "../mixins";
.file-list {
// this value affects virtualized lists, and without it
@ -15,13 +17,7 @@
// fall back to using the ambient foreground color of the
// list item.
.list-item:not(:focus) {
.status {
&-new { fill: var(--color-new); }
&-copied { fill: var(--color-new); }
&-modified { fill: var(--color-modified); }
&-renamed { fill: var(--color-modified); }
&-deleted { fill: var(--color-deleted); }
}
@include octicon-status
}
.file {

View file

@ -5,7 +5,6 @@
min-width: 0;
.header {
background: var(--diff-hunk-background-color);
display: flex;
@ -19,13 +18,7 @@
flex-grow: 1;
}
.status {
&-new { fill: var(--color-new); }
&-copied { fill: var(--color-new); }
&-modified { fill: var(--color-modified); }
&-renamed { fill: var(--color-modified); }
&-deleted { fill: var(--color-deleted); }
}
@include octicon-status;
.octicon { vertical-align: text-bottom; }
}