-
Notifications
You must be signed in to change notification settings - Fork 30.1k
/
Copy pathstatusbarpart.css
241 lines (200 loc) · 8.56 KB
/
statusbarpart.css
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.monaco-workbench .part.statusbar {
box-sizing: border-box;
cursor: default;
width: 100%;
height: 22px;
font-size: 12px;
display: flex;
overflow: hidden;
}
.monaco-workbench:not(.reduce-motion) .part.statusbar {
transition: background-color 0.15s ease-out;
}
.monaco-workbench .part.statusbar.status-border-top::after {
content: '';
position: absolute;
top: 0;
left: 0;
z-index: 5;
pointer-events: none;
background-color: var(--status-border-top-color);
width: 100%;
height: 1px;
}
.monaco-workbench .part.statusbar > .left-items,
.monaco-workbench .part.statusbar > .right-items {
display: flex;
}
.monaco-workbench .part.statusbar > .right-items {
flex-wrap: wrap; /* overflow elements by wrapping */
flex-direction: row-reverse; /* let the elements to the left wrap first */
}
.monaco-workbench .part.statusbar > .left-items {
flex-grow: 1; /* left items push right items to the far right end */
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item {
display: inline-block;
line-height: 22px;
height: 100%;
vertical-align: top;
max-width: 40vw;
font-variant-numeric: tabular-nums;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.has-beak {
position: relative;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.has-beak > .status-bar-item-beak-container {
position: absolute;
left: calc(50% - 5px); /* centering relative to parent */
top: -5px;
width: 10px;
height: 5px;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.has-beak > .status-bar-item-beak-container:before {
content: '';
position: fixed;
border-bottom-width: 5px;
border-bottom-style: solid;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item > .statusbar-item-label {
margin-right: 3px;
margin-left: 3px;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.compact-left > .statusbar-item-label {
margin-right: 3px;
margin-left: 0;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.compact-right > .statusbar-item-label {
margin-right: 0;
margin-left: 3px;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.compact-left.compact-right > .statusbar-item-label {
margin-right:0;
margin-left: 0;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.left.first-visible-item {
padding-left: 7px; /* Add padding to the most left status bar item */
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.right.last-visible-item {
margin-right: 7px; /* Add margin to the most right status bar item */
}
/* Tweak appearance for items with background to improve hover feedback */
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.has-background-color.left.first-visible-item,
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.has-background-color.right.last-visible-item {
padding-right: 0;
padding-left: 0;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.has-background-color > .statusbar-item-label {
margin-right: 0;
margin-left: 0;
padding-left: 10px;
padding-right: 10px;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.compact-left.has-background-color > .statusbar-item-label {
padding-left: 3px;
padding-right: 10px;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.compact-right.has-background-color > .statusbar-item-label {
padding-left: 10px;
padding-right: 3px;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item > .statusbar-item-label {
cursor: pointer;
display: flex;
height: 100%;
padding: 0 5px 0 5px;
white-space: pre; /* gives some degree of styling */
align-items: center;
text-overflow: ellipsis;
overflow: hidden;
outline-width: 0px; /* do not render focus outline, we already have background */
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.compact-left > .statusbar-item-label {
padding: 0 3px;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.compact-right > .statusbar-item-label {
padding: 0 3px;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item > a:hover:not(.disabled) {
text-decoration: none;
color: var(--vscode-statusBarItem-hoverForeground);
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item > a.disabled {
cursor: default;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item span.codicon {
text-align: center;
font-size: 14px;
color: inherit;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item a:active:not(.disabled) {
outline: 1px solid var(--vscode-contrastActiveBorder) !important;
outline-offset: -1px;
}
.monaco-workbench:not(.hc-light):not(.hc-black) .part.statusbar > .items-container > .statusbar-item a:active:not(.disabled) {
background-color: var(--vscode-statusBarItem-activeBackground) !important;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item a:hover:not(.disabled) {
outline: 1px dashed var(--vscode-contrastActiveBorder);
outline-offset: -1px;
}
.monaco-workbench:not(.hc-light):not(.hc-black) .part.statusbar > .items-container > .statusbar-item a:hover:not(.disabled) {
background-color: var(--vscode-statusBarItem-hoverBackground);
}
/** Status bar entry item kinds */
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.warning-kind {
color: var(--vscode-statusBarItem-warningForeground);
background-color: var(--vscode-statusBarItem-warningBackground);
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.warning-kind a:hover:not(.disabled) {
color: var(--vscode-statusBarItem-warningHoverForeground);
background-color: var(--vscode-statusBarItem-warningHoverBackground) !important;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.error-kind {
color: var(--vscode-statusBarItem-errorForeground);
background-color: var(--vscode-statusBarItem-errorBackground);
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.error-kind a:hover:not(.disabled) {
color: var(--vscode-statusBarItem-errorHoverForeground);
background-color: var(--vscode-statusBarItem-errorHoverBackground) !important;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.prominent-kind {
color: var(--vscode-statusBarItem-prominentForeground);
background-color: var(--vscode-statusBarItem-prominentBackground);
}
/**
* Using :not(.compact-right):not(.compact-left) here to improve the visual appearance
* when a prominent item uses `compact: true` with other items. The presence of the
* !important directive for `background-color` otherwise blocks our special hover handling
* code here:
* https://github.com/microsoft/vscode/blob/c2037f152b2bb3119ce1d87f52987776540dd57f/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts#L483-L505
*
* Note: this is currently only done for the prominent kind, but needs to be expanded if
* other kinds use compact feature.
*/
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.prominent-kind:not(.compact-right):not(.compact-left) a:hover:not(.disabled) {
color: var(--vscode-statusBarItem-prominentHoverForeground);
background-color: var(--vscode-statusBarItem-prominentHoverBackground) !important;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.remote-kind {
color: var(--vscode-statusBarItem-remoteForeground);
background-color: var(--vscode-statusBarItem-remoteBackground);
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.remote-kind a:hover:not(.disabled) {
color: var(--vscode-statusBarItem-remoteHoverForeground);
background-color: var(--vscode-statusBarItem-remoteHoverBackground) !important;
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.offline-kind {
color: var(--vscode-statusBarItem-offlineForeground);
background-color: var(--vscode-statusBarItem-offlineBackground);
}
.monaco-workbench .part.statusbar > .items-container > .statusbar-item.offline-kind a:hover:not(.disabled) {
color: var(--vscode-statusBarItem-offlineHoverForeground);
background-color: var(--vscode-statusBarItem-offlineHoverBackground) !important;
}