mirror of
https://github.com/desktop/desktop
synced 2024-10-30 17:25:09 +00:00
extract mixin for octicon status colourings
This commit is contained in:
parent
a372cc5b5f
commit
d985f1437b
4 changed files with 14 additions and 15 deletions
|
@ -1,3 +1,4 @@
|
|||
@import "mixins/platform";
|
||||
@import "mixins/window";
|
||||
@import "mixins/ellipsis";
|
||||
@import "mixins/octicon-status";
|
||||
|
|
9
app/styles/mixins/_octicon-status.scss
Normal file
9
app/styles/mixins/_octicon-status.scss
Normal 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); }
|
||||
}
|
||||
}
|
|
@ -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 {
|
||||
|
|
|
@ -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; }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue