forked from atom/atom
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit-diff.less
More file actions
78 lines (70 loc) · 1.69 KB
/
git-diff.less
File metadata and controls
78 lines (70 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
@import "syntax-variables";
@import "octicon-utf-codes";
@import "octicon-mixins";
atom-text-editor {
.gutter .line-number {
&.git-line-modified {
border-left: 2px solid @syntax-color-modified;
padding-left: ~"calc(0.5em - 2px)";
}
&.git-line-added {
border-left: 2px solid @syntax-color-added;
padding-left: ~"calc(0.5em - 2px)";
}
@size: 4px;
&.git-line-removed:before,
&.git-previous-line-removed:before {
position: absolute;
left: 0;
height: 0;
width: 0;
content: "";
border: solid transparent;
border-left-color: @syntax-color-removed;
border-width: @size;
margin-top: -@size;
pointer-events: none;
}
&.git-line-removed:before {
bottom: -@size;
}
&.git-previous-line-removed:before {
top: 0;
}
}
.gutter.git-diff-icon .line-number {
border-left-width: 0;
padding-left: 1.4em; // space for diff icon
&:before {
.octicon-font();
content: "";
display: inline-block;
position: absolute;
top: .2em;
left: .4em;
height: 0px; // make sure it doesnt affect the gutter line height.
width: 1em;
font-size: .75em;
}
&.git-line-modified:before {
content: @primitive-dot;
color: @syntax-color-modified;
}
&.git-line-added:before {
content: @plus;
color: @syntax-color-added;
}
&.git-line-removed:before,
&.git-previous-line-removed:before {
border: none; // reset triangle
content: @dash;
color: @syntax-color-removed;
}
&.git-line-removed:before {
top: 1em;
}
&.git-previous-line-removed:before {
top: 0;
}
}
}