tabstitlecontrol.css 14.1 KB
Newer Older
B
wip  
Benjamin Pasero 已提交
1 2 3 4 5
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

6
/* Title Container */
7

8
.monaco-workbench .part.editor > .content .editor-group-container > .title.tabs > .tabs-and-actions-container {
9 10 11
	display: flex;
}

12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
.monaco-workbench .part.editor > .content .editor-group-container > .title.tabs > .tabs-and-actions-container.tabs-border-bottom {
	position: relative;
}

.monaco-workbench .part.editor > .content .editor-group-container > .title.tabs > .tabs-and-actions-container.tabs-border-bottom::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	z-index: 5;
	pointer-events: none;
	background-color: var(--tabs-border-bottom-color);
	width: 100%;
	height: 1px;
}

28
.monaco-workbench .part.editor > .content .editor-group-container > .title.tabs > .tabs-and-actions-container > .monaco-scrollable-element {
29
	flex: 1;
30 31
}

32
.monaco-workbench .part.editor > .content .editor-group-container > .title.tabs > .tabs-and-actions-container > .monaco-scrollable-element .scrollbar {
B
Benjamin Pasero 已提交
33
	z-index: 3; /* on top of tabs */
34
	cursor: default;
B
Benjamin Pasero 已提交
35 36
}

37 38
/* Tabs Container */

39
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container {
B
Benjamin Pasero 已提交
40
	display: flex;
B
Benjamin Pasero 已提交
41
	height: 35px;
B
Benjamin Pasero 已提交
42
	scrollbar-width: none; /* Firefox: hide scrollbar */
B
Benjamin Pasero 已提交
43 44
}

45
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container.scroll {
B
Benjamin Pasero 已提交
46 47 48
	overflow: scroll !important;
}

49
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container::-webkit-scrollbar {
B
Benjamin Pasero 已提交
50
	display: none; /* Chrome + Safari: hide scrollbar */
B
Benjamin Pasero 已提交
51 52 53 54
}

/* Tab */

55
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab {
B
Benjamin Pasero 已提交
56
	position: relative;
B
Benjamin Pasero 已提交
57 58 59
	display: flex;
	white-space: nowrap;
	cursor: pointer;
60
	height: 35px;
B
Benjamin Pasero 已提交
61 62 63 64
	box-sizing: border-box;
	padding-left: 10px;
}

65 66
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.has-icon-theme.close-button-right,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.has-icon-theme.close-button-off {
B
Benjamin Pasero 已提交
67 68 69
	padding-left: 5px; /* reduce padding when we show icons and are in shrinking mode and tab close button is not left */
}

70
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fit {
71 72
	width: 120px;
	min-width: fit-content;
73
	min-width: -moz-fit-content;
M
Miguel Solorio 已提交
74
	flex-shrink: 0;
75 76
}

77
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink {
78
	min-width: 60px;
79 80 81
	flex-basis: 0; /* all tabs are even */
	flex-grow: 1; /* all tabs grow even */
	max-width: fit-content;
82
	max-width: -moz-fit-content;
83 84
}

M
Miguel Solorio 已提交
85 86 87 88
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-left .action-label {
	margin-right: 4px !important;
}

89 90
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.close-button-left::after,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.close-button-off::after {
B
Benjamin Pasero 已提交
91
	content: '';
92 93 94 95 96
	display: flex;
	flex: 0;
	width: 5px; /* Reserve space to hide tab fade when close button is left or off (fixes https://github.com/Microsoft/vscode/issues/45728) */
}

97
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.close-button-left {
98
	min-width: 80px; /* make more room for close button when it shows to the left */
99
	padding-right: 5px; /* we need less room when sizing is shrink */
100 101
}

102
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dragged {
103
	transform: translate3d(0px, 0px, 0px); /* forces tab to be drawn on a separate layer (fixes https://github.com/Microsoft/vscode/issues/18733) */
104 105
}

106
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dragged-over div {
107 108 109
	pointer-events: none; /* prevents cursor flickering (fixes https://github.com/Microsoft/vscode/issues/38753) */
}

110
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-left {
111
	flex-direction: row-reverse;
112
	padding-left: 0;
113
	padding-right: 10px;
114 115
}

B
Benjamin Pasero 已提交
116 117
/* Tab border top/bottom */

118 119
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab > .tab-border-top-container,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab > .tab-border-bottom-container {
B
Benjamin Pasero 已提交
120 121 122
	display: none; /* hidden by default until a color is provided (see below) */
}

123 124 125
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active.tab-border-top > .tab-border-top-container,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active.tab-border-bottom > .tab-border-bottom-container,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dirty-border-top > .tab-border-top-container {
B
Benjamin Pasero 已提交
126 127 128
	display: block;
	position: absolute;
	left: 0;
129
	z-index: 6; /* over possible title border */
B
Benjamin Pasero 已提交
130 131
	pointer-events: none;
	width: 100%;
A
Alexander 已提交
132 133
}

134
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active.tab-border-top > .tab-border-top-container {
A
Alexander 已提交
135
	top: 0;
B
Benjamin Pasero 已提交
136
	height: 1px;
A
Alexander 已提交
137
	background-color: var(--tab-border-top-color);
B
Benjamin Pasero 已提交
138 139
}

140
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active.tab-border-bottom > .tab-border-bottom-container {
B
Benjamin Pasero 已提交
141 142
	bottom: 0;
	height: 1px;
A
Alexander 已提交
143 144 145
	background-color: var(--tab-border-bottom-color);
}

146
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dirty-border-top > .tab-border-top-container {
A
Alexander 已提交
147 148 149
	top: 0;
	height: 2px;
	background-color: var(--tab-dirty-border-top-color);
B
Benjamin Pasero 已提交
150 151
}

152 153
/* Tab Label */

154
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab .tab-label {
155 156 157 158
	margin-top: auto;
	margin-bottom: auto;
}

159
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink .tab-label {
160 161 162
	position: relative;
}

163
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container >  .tab.sizing-shrink > .tab-label::after {
B
Benjamin Pasero 已提交
164
	content: '';
165 166 167
	position: absolute;
	right: 0;
	height: 100%;
168
	width: 5px;
169 170 171 172
	opacity: 1;
	padding: 0;
}

173
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container >  .tab.sizing-shrink:focus > .tab-label::after {
174 175 176
	opacity: 0; /* when tab has the focus this shade breaks the tab border (fixes https://github.com/Microsoft/vscode/issues/57819) */
}

177
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fit .monaco-icon-label,
178
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fit .monaco-icon-label > .monaco-icon-label-container {
179 180 181
	overflow: visible; /* fixes https://github.com/Microsoft/vscode/issues/20182 */
}

182
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink > .monaco-icon-label > .monaco-icon-label-container {
183 184 185
	text-overflow: clip;
}

186
.hc-black .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink > .monaco-icon-label > .monaco-icon-label-container {
187 188 189
	text-overflow: ellipsis;
}

190
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab .monaco-icon-label::before {
191 192 193
	height: 16px; /* tweak the icon size of the editor labels when icons are enabled */
}

B
Benjamin Pasero 已提交
194 195
/* Tab Close */

196
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab > .tab-close {
B
Benjamin Pasero 已提交
197 198 199
	margin-top: auto;
	margin-bottom: auto;
	width: 28px;
B
Benjamin Pasero 已提交
200 201
}

202
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-right.sizing-shrink > .tab-close {
203 204 205 206
	flex: 0;
	overflow: hidden; /* let the close button be pushed out of view when sizing is set to shrink to make more room... */
}

207 208 209
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dirty.close-button-right.sizing-shrink > .tab-close,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-right.sizing-shrink:hover > .tab-close,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-right.sizing-shrink > .tab-close:focus-within {
B
Benjamin Pasero 已提交
210
	overflow: visible; /* ...but still show the close button on hover, focus and when dirty */
211 212
}

213
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-off:not(.dirty) > .tab-close {
214 215 216
	display: none; /* hide the close action bar when we are configured to hide it */
}

217 218 219 220 221
.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab.active > .tab-close .action-label,			/* always show it for active tab */
.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab > .tab-close .action-label:focus,			/* always show it on focus */
.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab:hover > .tab-close .action-label,			/* always show it on hover */
.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab.active:hover > .tab-close .action-label,		/* always show it on hover */
.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab.dirty > .tab-close .action-label {			/* always show it for dirty tabs */
B
Benjamin Pasero 已提交
222 223 224
	opacity: 1;
}

M
Miguel Solorio 已提交
225 226
.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab > .tab-close .action-label.codicon {
	color: inherit;
M
Miguel Solorio 已提交
227
	font-size: 16px;
M
Miguel Solorio 已提交
228 229
}

M
Miguel Solorio 已提交
230
/* change close icon to dirty state icon */
M
Miguel Solorio 已提交
231 232
.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab.dirty > .tab-close .action-label:not(:hover)::before,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dirty > .tab-close .action-label:not(:hover)::before {
M
Miguel Solorio 已提交
233
	content: "\ea71"; /* use `circle-filled` icon unicode */
234 235
}

236 237 238 239
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active > .tab-close .action-label,					/* show dimmed for inactive group */
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active:hover > .tab-close .action-label,			/* show dimmed for inactive group */
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dirty > .tab-close .action-label,					/* show dimmed for inactive group */
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab:hover > .tab-close .action-label {					/* show dimmed for inactive group */
B
Benjamin Pasero 已提交
240 241 242
	opacity: 0.5;
}

243
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab > .tab-close .action-label {
B
Benjamin Pasero 已提交
244 245 246 247 248 249 250 251
	opacity: 0;
	display: block;
	height: 16px;
	width: 16px;
	background-size: 16px;
	background-position: center center;
	background-repeat: no-repeat;
	margin-right: 0.5em;
252 253
}

B
Benjamin Pasero 已提交
254 255
/* No Tab Close Button */

256
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-off {
B
Benjamin Pasero 已提交
257
	padding-right: 10px; /* give a little bit more room if close button is off */
B
Benjamin Pasero 已提交
258 259
}

260
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.close-button-off {
261 262 263
	padding-right: 5px; /* we need less room when sizing is shrink */
}

M
Miguel Solorio 已提交
264
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-off.dirty-border-top > .tab-close,
M
Miguel Solorio 已提交
265 266 267 268
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-off.dirty-border-top > .tab-close {
	display: none; /* hide dirty state when highlightModifiedTabs is enabled and when running without close button */
}

269
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-off.dirty:not(.dirty-border-top) {
270
	padding-right: 0; /* remove extra padding when we are running without close button */
B
Benjamin Pasero 已提交
271 272
}

273 274 275 276
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-off > .tab-close {
	pointer-events: none; /* don't allow dirty state/close button to be clicked when running without close button */
}

277
/* Editor Actions */
278

279
.monaco-workbench .part.editor > .content .editor-group-container > .title .editor-actions {
B
Benjamin Pasero 已提交
280
	cursor: default;
B
wip  
Benjamin Pasero 已提交
281
	flex: initial;
M
Miguel Solorio 已提交
282
	padding: 0 8px 0 4px;
283 284 285 286 287
	height: 35px;
}

/* Breadcrumbs */

288
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs .breadcrumbs-control {
289
	flex: 1 100%;
290
	height: 22px;
J
Johannes Rieken 已提交
291
	cursor: default;
292
}
293

294
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs .breadcrumbs-control .monaco-icon-label {
295 296 297 298
	height: 22px;
	line-height: 22px;
}

299
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs .breadcrumbs-control .monaco-icon-label::before {
300
	height: 22px; /* tweak the icon size of the editor labels when icons are enabled */
301
}
J
Johannes Rieken 已提交
302

303
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs  .breadcrumbs-control .monaco-breadcrumb-item {
304
	max-width: 80%;
305 306
}

307
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs  .breadcrumbs-control .monaco-breadcrumb-item::before {
308
	width: 16px;
309
	height: 22px;
310 311 312
	display: flex;
	align-items: center;
	justify-content: center;
J
Johannes Rieken 已提交
313 314
}

315
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs  .breadcrumbs-control .monaco-breadcrumb-item:last-child {
316 317
	padding-right: 8px;
}