Repository navigation
Expand file tree
/
Copy pathconflicting-editor.less
More file actions
104 lines (83 loc) · 2.92 KB
/
Copy pathconflicting-editor.less
File metadata and controls
104 lines (83 loc) · 2.92 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
@import "variables";
@conflict-color-ours: spin(@syntax-color-renamed, 80); // usually magenta/purple-ish
@conflict-color-theirs: @syntax-color-renamed;
@conflict-color-base: desaturate( @syntax-color-renamed, 100% );
@conflict-color-modified: @syntax-color-modified;
@conflict-color-resolved: @syntax-color-added;
atom-text-editor {
.github-ConflictBlock {
display: flex;
align-items: center;
margin-right: @component-padding;
padding: @component-padding / 2;
cursor: default;
color: fade(@syntax-text-color, 75%);
.github-ResolutionControls {
flex: 1;
button {
margin-right: @component-padding;
}
span {
cursor: pointer;
}
}
}
.github-SideDescription {
font-family: @font-family;
font-size: .9em;
}
.github-ResolutionControls .icon {
line-height: 0;
}
.github-ConflictTopBlock {
margin-top: @component-padding;
border-top-left-radius: @component-border-radius * 1.5;
border-top-right-radius: @component-border-radius * 1.5;
}
.github-ConflictBottomBlock {
margin-bottom: @component-padding;
border-bottom-left-radius: @component-border-radius * 1.5;
border-bottom-right-radius: @component-border-radius * 1.5;
}
// Color variations -------------------------
.generate-conflicts(@name, @color) {
.github-Conflict@{name} {
margin-right: @component-padding;
background-color: @color;
&.cursor-line { background-color: fadein(@color, 10%) !important; }
}
.github-Conflict@{name}Banner {
margin-right: @component-padding;
background-color: @color;
&.cursor-line { background-color: fadein(@color, 10%) !important; }
&.github-ConflictUnmodifiedBanner span { color: fade(@color, 66%) !important; };
}
.github-Conflict@{name}Block {
color: contrast(@syntax-background-color, hsla(0,0%,0%,.66), hsla(0,0%,100%,.5));
background-color: fadein(@color, 20%);
.btn {
color: white;
border-color: hsla(0,0%,0%,.15);
border: none;
background: fade(@color, 100%);
}
}
}
.generate-conflicts(Ours, fade(@conflict-color-ours, 15%) );
.generate-conflicts(Theirs, fade(@conflict-color-theirs, 15%) );
.generate-conflicts(Base, fade(@conflict-color-base, 15%) );
.generate-conflicts(Modified, fade(@conflict-color-modified, 15%) );
// Separator -------------------------
// Uses same color as Base
.github-ConflictSeparator {
margin-right: @component-padding;
background-color: fade(@conflict-color-base, 15%);
&.cursor-line { background-color: fade(@conflict-color-base, 25%) !important; }
span { color: fade(@conflict-color-base, 66%) !important; };
}
// Resolved -------------------------
.github-ResolvedLines {
background-color: fade(@conflict-color-resolved, 15%);
&.cursor-line { background-color: fade(@conflict-color-resolved, 25%) !important; }
}
}