tabstitlecontrol.css 15.4 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
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.has-icon-theme.close-button-right,
66 67
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.has-icon-theme.close-button-off:not(.sticky) {
	padding-left: 5px; /* reduce padding when we show icons and are in shrinking mode and tab close button is not left (unless sticky) */
B
Benjamin Pasero 已提交
68 69
}

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
}

85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fit.sticky,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.sticky {

	/** Sticky tabs do not scroll in case of overflow and are always above unsticky tabs which scroll under */
	position: sticky;
	z-index: 1;

	/** Sticky tabs are even and never grow */
	flex-basis: 0;
	flex-grow: 0;

	/** Sticky tabs have a fixed width of 38px */
	width: 38px;
	min-width: 38px;
	max-width: 38px;
}

.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container.disable-sticky-tabs > .tab.sizing-fit.sticky,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container.disable-sticky-tabs > .tab.sizing-shrink.sticky {

	/** Disable sticky positions for sticky tabs if the available space is too little */
	position: static;
}

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

113 114
.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 已提交
115
	content: '';
116 117 118 119 120
	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) */
}

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

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

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

134
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-left {
135
	flex-direction: row-reverse;
136
	padding-left: 0;
137
	padding-right: 10px;
138 139
}

B
Benjamin Pasero 已提交
140 141
/* Tab border top/bottom */

142 143
.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 已提交
144 145 146
	display: none; /* hidden by default until a color is provided (see below) */
}

147 148 149
.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 已提交
150 151 152
	display: block;
	position: absolute;
	left: 0;
153
	z-index: 6; /* over possible title border */
B
Benjamin Pasero 已提交
154 155
	pointer-events: none;
	width: 100%;
A
Alexander 已提交
156 157
}

158
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active.tab-border-top > .tab-border-top-container {
A
Alexander 已提交
159
	top: 0;
B
Benjamin Pasero 已提交
160
	height: 1px;
A
Alexander 已提交
161
	background-color: var(--tab-border-top-color);
B
Benjamin Pasero 已提交
162 163
}

164
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active.tab-border-bottom > .tab-border-bottom-container {
B
Benjamin Pasero 已提交
165 166
	bottom: 0;
	height: 1px;
A
Alexander 已提交
167 168 169
	background-color: var(--tab-border-bottom-color);
}

170
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dirty-border-top > .tab-border-top-container {
A
Alexander 已提交
171 172 173
	top: 0;
	height: 2px;
	background-color: var(--tab-dirty-border-top-color);
B
Benjamin Pasero 已提交
174 175
}

176 177
/* Tab Label */

178
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab .tab-label {
179 180 181 182
	margin-top: auto;
	margin-bottom: auto;
}

183
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink .tab-label {
184 185 186
	position: relative;
}

187
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container >  .tab.sizing-shrink > .tab-label::after {
B
Benjamin Pasero 已提交
188
	content: '';
189 190 191
	position: absolute;
	right: 0;
	height: 100%;
192
	width: 5px;
193 194 195 196
	opacity: 1;
	padding: 0;
}

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

201 202 203 204
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sticky:not(.has-icon-theme) .monaco-icon-label {
	text-align: center; /* ensure that sticky tabs without icon have label centered */
}

205
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fit .monaco-icon-label,
206
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fit .monaco-icon-label > .monaco-icon-label-container {
207 208 209
	overflow: visible; /* fixes https://github.com/Microsoft/vscode/issues/20182 */
}

210
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink > .monaco-icon-label > .monaco-icon-label-container {
211 212 213
	text-overflow: clip;
}

214
.hc-black .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink > .monaco-icon-label > .monaco-icon-label-container {
215 216 217
	text-overflow: ellipsis;
}

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

B
Benjamin Pasero 已提交
222 223
/* Tab Close */

224
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab > .tab-close {
B
Benjamin Pasero 已提交
225 226 227
	margin-top: auto;
	margin-bottom: auto;
	width: 28px;
B
Benjamin Pasero 已提交
228 229
}

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

235 236 237
.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 已提交
238
	overflow: visible; /* ...but still show the close button on hover, focus and when dirty */
239 240
}

241 242 243
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-off:not(.dirty) > .tab-close,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-off.sticky > .tab-close {
	display: none; /* hide the close action bar when we are configured to hide it (unless dirty, but always when sticky) */
244 245
}

246 247 248
.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 */
249
.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab.active:hover > .tab-close .action-label,	/* always show it on hover */
250
.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 已提交
251 252 253
	opacity: 1;
}

M
Miguel Solorio 已提交
254 255
.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab > .tab-close .action-label.codicon {
	color: inherit;
M
Miguel Solorio 已提交
256
	font-size: 16px;
M
Miguel Solorio 已提交
257 258
}

M
Miguel Solorio 已提交
259
/* change close icon to dirty state icon */
M
Miguel Solorio 已提交
260 261
.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 已提交
262
	content: "\ea71"; /* use `circle-filled` icon unicode */
263 264
}

265
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active > .tab-close .action-label,				/* show dimmed for inactive group */
266 267
.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 */
268
.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 已提交
269 270 271
	opacity: 0.5;
}

272
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab > .tab-close .action-label {
B
Benjamin Pasero 已提交
273 274 275 276 277 278 279 280
	opacity: 0;
	display: block;
	height: 16px;
	width: 16px;
	background-size: 16px;
	background-position: center center;
	background-repeat: no-repeat;
	margin-right: 0.5em;
281 282
}

B
Benjamin Pasero 已提交
283 284
/* No Tab Close Button */

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

289 290
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.close-button-off:not(.sticky) {
	padding-right: 5px; /* we need less room when sizing is shrink (unless tab is sticky) */
291 292
}

M
Miguel Solorio 已提交
293 294 295 296
.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 */
}

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

301 302 303 304
.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 */
}

305
/* Editor Actions */
306

307
.monaco-workbench .part.editor > .content .editor-group-container > .title .editor-actions {
B
Benjamin Pasero 已提交
308
	cursor: default;
B
wip  
Benjamin Pasero 已提交
309
	flex: initial;
M
Miguel Solorio 已提交
310
	padding: 0 8px 0 4px;
311 312 313 314 315
	height: 35px;
}

/* Breadcrumbs */

316
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs .breadcrumbs-control {
317
	flex: 1 100%;
318
	height: 22px;
J
Johannes Rieken 已提交
319
	cursor: default;
320
}
321

322
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs .breadcrumbs-control .monaco-icon-label {
323 324 325 326
	height: 22px;
	line-height: 22px;
}

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

331
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs  .breadcrumbs-control .monaco-breadcrumb-item {
332
	max-width: 80%;
333 334
}

335
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs  .breadcrumbs-control .monaco-breadcrumb-item::before {
336
	width: 16px;
337
	height: 22px;
338 339 340
	display: flex;
	align-items: center;
	justify-content: center;
J
Johannes Rieken 已提交
341 342
}

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