tabstitlecontrol.css 16.6 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 135 136 137
	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) */
}

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 {
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 {
148 149 150
	pointer-events: none; /* prevents cursor flickering (fixes https://github.com/Microsoft/vscode/issues/38753) */
}

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 {
216 217 218
	opacity: 0; /* when tab has the focus this shade breaks the tab border (fixes https://github.com/Microsoft/vscode/issues/57819) */
}

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 {
225 226 227
	overflow: visible; /* fixes https://github.com/Microsoft/vscode/issues/20182 */
}

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 250 251 252
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dirty.tab-actions-right.sizing-shrink > .tab-actions,
.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 {
	overflow: visible; /* ...but still show the tab actions on hover, focus and when dirty */
253 254
}

255 256 257
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.tab-actions-off:not(.dirty) > .tab-actions,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.tab-actions-off.sticky-compact > .tab-actions {
	display: none; /* hide the tab actions when we are configured to hide it (unless dirty, but always when sticky-compact) */
258 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 */
.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 已提交
265 266 267
	opacity: 1;
}

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

273 274 275
/* change tab actions icon to dirty state icon if tab dirty */
.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 {
M
Miguel Solorio 已提交
276
	content: "\ea71"; /* use `circle-filled` icon unicode */
277 278
}

279 280 281 282
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active > .tab-actions .action-label,			/* show tab actions dimmed for inactive group */
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active:hover > .tab-actions .action-label,	/* show tab actions dimmed for inactive group */
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dirty > .tab-actions .action-label,			/* show tab actions dimmed for inactive group */
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab:hover > .tab-actions .action-label {			/* show tab actions dimmed for inactive group */
B
Benjamin Pasero 已提交
283 284 285
	opacity: 0.5;
}

286
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab > .tab-actions .action-label {
B
Benjamin Pasero 已提交
287 288 289 290 291 292 293 294
	opacity: 0;
	display: block;
	height: 16px;
	width: 16px;
	background-size: 16px;
	background-position: center center;
	background-repeat: no-repeat;
	margin-right: 0.5em;
295 296
}

297
/* No Tab Actions */
B
Benjamin Pasero 已提交
298

299 300
.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 已提交
301 302
}

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

307 308
.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 已提交
309 310
}

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

315 316
.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 */
317 318
}

319
/* Editor Actions */
320

321
.monaco-workbench .part.editor > .content .editor-group-container > .title .editor-actions {
B
Benjamin Pasero 已提交
322
	cursor: default;
B
wip  
Benjamin Pasero 已提交
323
	flex: initial;
M
Miguel Solorio 已提交
324
	padding: 0 8px 0 4px;
325 326 327 328 329
	height: 35px;
}

/* Breadcrumbs */

330
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs .breadcrumbs-control {
331
	flex: 1 100%;
332
	height: 22px;
J
Johannes Rieken 已提交
333
	cursor: default;
334
}
335

336
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs .breadcrumbs-control .monaco-icon-label {
337 338 339 340
	height: 22px;
	line-height: 22px;
}

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

345
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs  .breadcrumbs-control .monaco-breadcrumb-item {
346
	max-width: 80%;
347 348
}

349
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs  .breadcrumbs-control .monaco-breadcrumb-item::before {
350
	width: 16px;
351
	height: 22px;
352 353 354
	display: flex;
	align-items: center;
	justify-content: center;
J
Johannes Rieken 已提交
355 356
}

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