tabstitlecontrol.css 17.5 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 67
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.has-icon.tab-actions-right,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.has-icon.tab-actions-off:not(.sticky-compact) {
	padding-left: 5px; /* reduce padding when we show icons and are in shrinking mode and tab actions is not left (unless sticky-compact) */
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: 80px;
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
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fit.sticky-compact,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.sticky-compact,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fit.sticky-shrink,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.sticky-shrink {
89

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

94
	/** Sticky compact/shrink tabs are even and never grow */
95 96
	flex-basis: 0;
	flex-grow: 0;
97 98 99 100
}

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

102
	/** Sticky compact tabs have a fixed width of 38px */
103 104 105 106 107
	width: 38px;
	min-width: 38px;
	max-width: 38px;
}

108 109 110 111 112 113 114 115 116 117 118 119 120
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fit.sticky-shrink,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.sticky-shrink {

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

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

122
	/** Disable sticky positions for sticky compact/shrink tabs if the available space is too little */
123 124 125
	position: static;
}

126
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.tab-actions-left .action-label {
M
Miguel Solorio 已提交
127 128 129
	margin-right: 4px !important;
}

130 131
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.tab-actions-left::after,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.tab-actions-off::after {
B
Benjamin Pasero 已提交
132
	content: '';
133 134
	display: flex;
	flex: 0;
C
ChaseKnowlden 已提交
135
	width: 5px; /* Reserve space to hide tab fade when close button is left or off (fixes https://github.com/microsoft/vscode/issues/45728) */
136 137
}

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

143
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dragged {
C
ChaseKnowlden 已提交
144
	transform: translate3d(0px, 0px, 0px); /* forces tab to be drawn on a separate layer (fixes https://github.com/microsoft/vscode/issues/18733) */
145 146
}

147
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dragged-over div {
C
ChaseKnowlden 已提交
148
	pointer-events: none; /* prevents cursor flickering (fixes https://github.com/microsoft/vscode/issues/38753) */
149 150
}

151
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.tab-actions-left {
152
	flex-direction: row-reverse;
153
	padding-left: 0;
154
	padding-right: 10px;
155 156
}

B
Benjamin Pasero 已提交
157 158
/* Tab border top/bottom */

159 160
.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 已提交
161 162 163
	display: none; /* hidden by default until a color is provided (see below) */
}

164 165 166
.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 已提交
167 168 169
	display: block;
	position: absolute;
	left: 0;
170
	z-index: 6; /* over possible title border */
B
Benjamin Pasero 已提交
171 172
	pointer-events: none;
	width: 100%;
A
Alexander 已提交
173 174
}

175
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active.tab-border-top > .tab-border-top-container {
A
Alexander 已提交
176
	top: 0;
B
Benjamin Pasero 已提交
177
	height: 1px;
A
Alexander 已提交
178
	background-color: var(--tab-border-top-color);
B
Benjamin Pasero 已提交
179 180
}

181
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active.tab-border-bottom > .tab-border-bottom-container {
B
Benjamin Pasero 已提交
182 183
	bottom: 0;
	height: 1px;
A
Alexander 已提交
184 185 186
	background-color: var(--tab-border-bottom-color);
}

187
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dirty-border-top > .tab-border-top-container {
A
Alexander 已提交
188 189 190
	top: 0;
	height: 2px;
	background-color: var(--tab-dirty-border-top-color);
B
Benjamin Pasero 已提交
191 192
}

193 194
/* Tab Label */

195
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab .tab-label {
196 197
	margin-top: auto;
	margin-bottom: auto;
198
	line-height: 35px; /* aligns icon and label vertically centered in the tab */
199 200
}

201
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink .tab-label {
202 203 204
	position: relative;
}

205
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container >  .tab.sizing-shrink > .tab-label::after {
B
Benjamin Pasero 已提交
206
	content: '';
207 208 209
	position: absolute;
	right: 0;
	height: 100%;
210
	width: 5px;
211 212 213 214
	opacity: 1;
	padding: 0;
}

215
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container >  .tab.sizing-shrink:focus > .tab-label::after {
C
ChaseKnowlden 已提交
216
	opacity: 0; /* when tab has the focus this shade breaks the tab border (fixes https://github.com/microsoft/vscode/issues/57819) */
217 218
}

219 220
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sticky-compact:not(.has-icon) .monaco-icon-label {
	text-align: center; /* ensure that sticky-compact tabs without icon have label centered */
221 222
}

223
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fit .monaco-icon-label,
224
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fit .monaco-icon-label > .monaco-icon-label-container {
C
ChaseKnowlden 已提交
225
	overflow: visible; /* fixes https://github.com/microsoft/vscode/issues/20182 */
226 227
}

228
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink > .monaco-icon-label > .monaco-icon-label-container {
229 230 231
	text-overflow: clip;
}

232
.monaco-workbench.hc-black .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink > .monaco-icon-label > .monaco-icon-label-container {
233 234 235
	text-overflow: ellipsis;
}

236
/* Tab Actions */
B
Benjamin Pasero 已提交
237

238
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab > .tab-actions {
B
Benjamin Pasero 已提交
239 240 241
	margin-top: auto;
	margin-bottom: auto;
	width: 28px;
B
Benjamin Pasero 已提交
242 243
}

244
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.tab-actions-right.sizing-shrink > .tab-actions {
245
	flex: 0;
246
	overflow: hidden; /* let the tab actions be pushed out of view when sizing is set to shrink to make more room... */
247 248
}

249
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dirty.tab-actions-right.sizing-shrink > .tab-actions,
250
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sticky.tab-actions-right.sizing-shrink > .tab-actions,
251 252
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.tab-actions-right.sizing-shrink:hover > .tab-actions,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.tab-actions-right.sizing-shrink > .tab-actions:focus-within {
253
	overflow: visible; /* ...but still show the tab actions on hover, focus and when dirty or sticky */
254 255
}

256
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.tab-actions-off:not(.dirty):not(.sticky) > .tab-actions,
257
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.tab-actions-off.sticky-compact > .tab-actions {
258
	display: none; /* hide the tab actions when we are configured to hide it (unless dirty or sticky, but always when sticky-compact) */
259 260
}

261 262 263 264
.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab.active > .tab-actions .action-label,		/* always show tab actions for active tab */
.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab > .tab-actions .action-label:focus,		/* always show tab actions on focus */
.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab:hover > .tab-actions .action-label,		/* always show tab actions on hover */
.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab.active:hover > .tab-actions .action-label,	/* always show tab actions on hover */
265
.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab.sticky > .tab-actions .action-label,		/* always show tab actions for sticky tabs */
266
.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab.dirty > .tab-actions .action-label {		/* always show tab actions for dirty tabs */
B
Benjamin Pasero 已提交
267 268 269
	opacity: 1;
}

270
.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab > .tab-actions .action-label.codicon {
M
Miguel Solorio 已提交
271
	color: inherit;
M
Miguel Solorio 已提交
272
	font-size: 16px;
M
Miguel Solorio 已提交
273 274
}

275 276 277 278 279
.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab.sticky.dirty > .tab-actions .action-label:not(:hover)::before,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sticky.dirty > .tab-actions .action-label:not(:hover)::before {
	content: "\ebb2"; /* use `pinned-dirty` icon unicode for sticky-dirty indication */
}

280 281
.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab.dirty > .tab-actions .action-label:not(:hover)::before,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dirty > .tab-actions .action-label:not(:hover)::before {
282
	content: "\ea71"; /* use `circle-filled` icon unicode for dirty indication */
283 284
}

285 286 287 288 289 290
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active > .tab-actions .action-label,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active:hover > .tab-actions .action-label,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dirty > .tab-actions .action-label,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sticky > .tab-actions .action-label,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab:hover > .tab-actions .action-label {
	opacity: 0.5; /* show tab actions dimmed for inactive group */
B
Benjamin Pasero 已提交
291 292
}

293
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab > .tab-actions .action-label {
B
Benjamin Pasero 已提交
294 295 296 297 298 299 300 301
	opacity: 0;
	display: block;
	height: 16px;
	width: 16px;
	background-size: 16px;
	background-position: center center;
	background-repeat: no-repeat;
	margin-right: 0.5em;
302 303
}

304
/* No Tab Actions */
B
Benjamin Pasero 已提交
305

306 307
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.tab-actions-off {
	padding-right: 10px; /* give a little bit more room if tab actions is off */
B
Benjamin Pasero 已提交
308 309
}

310
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink.tab-actions-off:not(.sticky-compact) {
311
	padding-right: 5px; /* we need less room when sizing is shrink (unless tab is sticky-compact) */
312 313
}

314 315
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.tab-actions-off.dirty-border-top > .tab-actions {
	display: none; /* hide dirty state when highlightModifiedTabs is enabled and when running without tab actions */
M
Miguel Solorio 已提交
316 317
}

318 319
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.tab-actions-off.dirty:not(.dirty-border-top):not(.sticky-compact),
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.tab-actions-off.sticky:not(.sticky-compact) {
320
	padding-right: 0; /* remove extra padding when we are running without tab actions (unless tab is sticky-compact) */
B
Benjamin Pasero 已提交
321 322
}

323 324
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.tab-actions-off > .tab-actions {
	pointer-events: none; /* don't allow tab actions to be clicked when running without tab actions */
325 326
}

327
/* Editor Actions */
328

329
.monaco-workbench .part.editor > .content .editor-group-container > .title .editor-actions {
B
Benjamin Pasero 已提交
330
	cursor: default;
B
wip  
Benjamin Pasero 已提交
331
	flex: initial;
M
Miguel Solorio 已提交
332
	padding: 0 8px 0 4px;
333 334 335 336 337
	height: 35px;
}

/* Breadcrumbs */

338
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs .breadcrumbs-control {
339
	flex: 1 100%;
340
	height: 22px;
J
Johannes Rieken 已提交
341
	cursor: default;
342
}
343

344
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs .breadcrumbs-control .monaco-icon-label {
345 346 347 348
	height: 22px;
	line-height: 22px;
}

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

353
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs  .breadcrumbs-control .monaco-breadcrumb-item {
354
	max-width: 80%;
355 356
}

357
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs  .breadcrumbs-control .monaco-breadcrumb-item::before {
358
	width: 16px;
359
	height: 22px;
360 361 362
	display: flex;
	align-items: center;
	justify-content: center;
J
Johannes Rieken 已提交
363 364
}

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