-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.js
162 lines (159 loc) · 4.21 KB
/
index.js
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
const backgroundColor = '#282c34';
const foregroundColor = '#abb2bf';
const cursorColor = foregroundColor;
const borderColor = backgroundColor;
const colors = {
black : backgroundColor,
red : '#ef596f', // red
green : '#89ca78', // green
yellow : '#d8985f', // yellow
blue : '#52adf2', // blue
magenta : '#d55fde', // pink
cyan : '#52adf2', // cyan
white : '#d0d0d0', // light gray
lightBlack : '#808080', // medium gray
lightRed : '#ef596f', // red
lightGreen : '#89ca78', // green
lightYellow : '#d8985f', // yellow
lightBlue : '#52adf2', // blue
lightMagenta: '#d55fde', // pink
lightCyan : '#52adf2', // cyan
colorCubes : '#ffffff', // white
grayscale : foregroundColor
};
exports.decorateConfig = config => {
return Object.assign({}, config, {
foregroundColor,
backgroundColor,
borderColor,
cursorColor,
colors,
termCSS: `
${config.termCSS || ''}
.cursor-node {
mix-blend-mode: difference;
border-left-width: 2px;
}
`,
css: `
${config.css || ''}
.header_header {
top: 0;
right: 0;
left: 0;
}
.tabs_list {
background-color: #21252b !important;
border-bottom-color: #181a1f !important;
}
.splitpane_divider {
background-color: rgba(171, 178, 191, 0.15) !important;
}
.tab_tab {
font-weight: 500;
color: rgba(157, 165, 180, 0.6);
border-width: 0 0 0 1px;
border-image: linear-gradient(#21252b, #181a1f 1em) 0 0 0 1 stretch;
border-style: solid;
}
.tab_tab:first-of-type {
border-width: 0;
}
.tab_tab:hover {
color: rgba(157, 165, 180, 0.6);
transition: none;
}
.tab_tab::after {
content: "";
position: absolute;
pointer-events: none;
top: 0;
bottom: -1px;
left: 0;
width: 2px;
height: inherit;
background: #528bff;
opacity: 0;
transition: opacity .16s;
z-index: 1;
}
.tabs_title,
.tab_tab.tab_active {
font-weight: 500;
color: #d7dae0;
}
.tab_tab.tab_active {
background-color: ${backgroundColor};
}
.tab_tab.tab_active,
.tab_tab.tab_active + .tab_tab {
border-image: linear-gradient(transparent, transparent) 0 0 0 1 stretch;
}
.tab_tab.tab_active::before {
content: "";
z-index: 1;
position: absolute;
top: 0;
left: -1px;
bottom: -1px;
right: 0;
height: inherit;
background-image: linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.06);
border: 1px solid #181a1f;
border-bottom-color: ${backgroundColor};
border-top: 0;
}
.tab_tab.tab_active:last-of-type::before {
border-right-width: 0;
}
.tab_tab.tab_active::after {
opacity: 1;
transition-duration: .32s;
}
.tab_icon {
display: block;
background: rgba(157, 165, 180, 0.6);
-webkit-mask-image: url('${__dirname}/close.svg');
mask-image: url('${__dirname}/close.svg');
-webkit-mask-size: 7px;
mask-size: 7px;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
-webkit-mask-position-y: center;
mask-position-y: center;
-webkit-mask-position-x: 8px;
mask-position-x: 8px;
width: 26px;
height: 100%;
top: 0;
right: 0;
transform: scale(0);
transition: transform .08s;
opacity: 1;
border-radius: 0;
z-index: 2;
}
.tab_icon:hover {
background: rgba(157, 165, 180, 0.6);
opacity: .7;
}
.tab_tab.tab_active .tab_icon {
background: #d7dae0;
}
.tab_tab.tab_active .tab_icon:hover {
background: #d7dae0;
}
.tab_tab:hover .tab_icon {
transform: scale(1);
transition-duration: .16s;
}
.tab_icon svg {
display: none;
}
.tab_icon::after {
display: none;
}
`
});
};