tabstitlecontrol.css 13.7 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
.monaco-workbench .part.editor > .content .editor-group-container > .title.tabs > .tabs-and-actions-container > .monaco-scrollable-element {
13
	flex: 1;
14 15
}

16
.monaco-workbench .part.editor > .content .editor-group-container > .title.tabs > .tabs-and-actions-container > .monaco-scrollable-element .scrollbar {
B
Benjamin Pasero 已提交
17
	z-index: 3; /* on top of tabs */
18
	cursor: default;
B
Benjamin Pasero 已提交
19 20
}

21 22
/* Tabs Container */

23
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container {
B
Benjamin Pasero 已提交
24
	display: flex;
B
Benjamin Pasero 已提交
25
	height: 35px;
B
Benjamin Pasero 已提交
26
	scrollbar-width: none; /* Firefox: hide scrollbar */
B
Benjamin Pasero 已提交
27 28
}

29
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container.scroll {
B
Benjamin Pasero 已提交
30 31 32
	overflow: scroll !important;
}

33
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container::-webkit-scrollbar {
B
Benjamin Pasero 已提交
34
	display: none; /* Chrome + Safari: hide scrollbar */
B
Benjamin Pasero 已提交
35 36 37 38
}

/* Tab */

39
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab {
B
Benjamin Pasero 已提交
40
	position: relative;
B
Benjamin Pasero 已提交
41 42 43
	display: flex;
	white-space: nowrap;
	cursor: pointer;
44
	height: 35px;
B
Benjamin Pasero 已提交
45 46 47 48
	box-sizing: border-box;
	padding-left: 10px;
}

49 50
.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 已提交
51 52 53
	padding-left: 5px; /* reduce padding when we show icons and are in shrinking mode and tab close button is not left */
}

54
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fit {
55 56
	width: 120px;
	min-width: fit-content;
57
	min-width: -moz-fit-content;
M
Miguel Solorio 已提交
58
	flex-shrink: 0;
59 60
}

61
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink {
62
	min-width: 60px;
63 64 65
	flex-basis: 0; /* all tabs are even */
	flex-grow: 1; /* all tabs grow even */
	max-width: fit-content;
66
	max-width: -moz-fit-content;
67 68
}

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

73 74
.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 已提交
75
	content: '';
76 77 78 79 80
	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) */
}

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

86
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dragged {
87 88 89
	will-change: transform; /* forces tab to be drawn on a separate layer (fixes https://github.com/Microsoft/vscode/issues/18733) */
}

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

94
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-left {
95
	flex-direction: row-reverse;
96
	padding-left: 0;
97
	padding-right: 10px;
98 99
}

B
Benjamin Pasero 已提交
100 101
/* Tab border top/bottom */

102 103
.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 已提交
104 105 106
	display: none; /* hidden by default until a color is provided (see below) */
}

107 108 109
.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 已提交
110 111 112
	display: block;
	position: absolute;
	left: 0;
113
	z-index: 6; /* over possible title border */
B
Benjamin Pasero 已提交
114 115
	pointer-events: none;
	width: 100%;
A
Alexander 已提交
116 117
}

118
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active.tab-border-top > .tab-border-top-container {
A
Alexander 已提交
119
	top: 0;
B
Benjamin Pasero 已提交
120
	height: 1px;
A
Alexander 已提交
121
	background-color: var(--tab-border-top-color);
B
Benjamin Pasero 已提交
122 123
}

124
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active.tab-border-bottom > .tab-border-bottom-container {
B
Benjamin Pasero 已提交
125 126
	bottom: 0;
	height: 1px;
A
Alexander 已提交
127 128 129
	background-color: var(--tab-border-bottom-color);
}

130
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.dirty-border-top > .tab-border-top-container {
A
Alexander 已提交
131 132 133
	top: 0;
	height: 2px;
	background-color: var(--tab-dirty-border-top-color);
B
Benjamin Pasero 已提交
134 135
}

136 137
/* Tab Label */

138
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab .tab-label {
139 140 141 142
	margin-top: auto;
	margin-bottom: auto;
}

143
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink .tab-label {
144 145 146
	position: relative;
}

147
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container >  .tab.sizing-shrink > .tab-label::after {
B
Benjamin Pasero 已提交
148
	content: '';
149 150 151
	position: absolute;
	right: 0;
	height: 100%;
152
	width: 5px;
153 154 155 156
	opacity: 1;
	padding: 0;
}

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

161 162
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fit .monaco-icon-label,
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-fit .monaco-icon-label > .monaco-icon-label-description-container {
163 164 165
	overflow: visible; /* fixes https://github.com/Microsoft/vscode/issues/20182 */
}

166
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink > .monaco-icon-label > .monaco-icon-label-description-container {
167 168 169
	text-overflow: clip;
}

170
.hc-black .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink > .monaco-icon-label > .monaco-icon-label-description-container {
171 172 173
	text-overflow: ellipsis;
}

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

B
Benjamin Pasero 已提交
178 179
/* Tab Close */

180
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab > .tab-close {
B
Benjamin Pasero 已提交
181 182 183
	margin-top: auto;
	margin-bottom: auto;
	width: 28px;
B
Benjamin Pasero 已提交
184 185
}

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

191 192 193
.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 已提交
194
	overflow: visible; /* ...but still show the close button on hover, focus and when dirty */
195 196
}

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

201 202 203 204 205
.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 已提交
206 207 208
	opacity: 1;
}

M
Miguel Solorio 已提交
209 210 211 212
.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab > .tab-close .action-label.codicon {
	color: inherit;
}

M
Miguel Solorio 已提交
213
/* change close icon to dirty state icon */
M
Miguel Solorio 已提交
214 215
.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 已提交
216
	content: "\ea71"; /* use `circle-filled` icon unicode */
217 218
}

219 220 221 222
.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 已提交
223 224 225
	opacity: 0.5;
}

226
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab > .tab-close .action-label {
B
Benjamin Pasero 已提交
227 228 229 230 231 232 233 234
	opacity: 0;
	display: block;
	height: 16px;
	width: 16px;
	background-size: 16px;
	background-position: center center;
	background-repeat: no-repeat;
	margin-right: 0.5em;
235 236
}

B
Benjamin Pasero 已提交
237 238
/* No Tab Close Button */

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

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

M
Miguel Solorio 已提交
247
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-off.dirty-border-top > .tab-close,
M
Miguel Solorio 已提交
248 249 250 251
.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 */
}

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

256 257 258 259
.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 */
}

260
/* Editor Actions */
261

262
.monaco-workbench .part.editor > .content .editor-group-container > .title .editor-actions {
B
Benjamin Pasero 已提交
263
	cursor: default;
B
wip  
Benjamin Pasero 已提交
264
	flex: initial;
M
Miguel Solorio 已提交
265
	padding: 0 8px 0 4px;
266 267 268 269 270
	height: 35px;
}

/* Breadcrumbs */

271
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs .breadcrumbs-control {
272
	flex: 1 100%;
273
	height: 22px;
J
Johannes Rieken 已提交
274
	cursor: default;
275
}
276

277
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs .breadcrumbs-control .monaco-icon-label {
278 279 280 281
	height: 22px;
	line-height: 22px;
}

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

286
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs  .breadcrumbs-control .monaco-breadcrumb-item {
287
	max-width: 80%;
288 289
}

290
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs  .breadcrumbs-control .monaco-breadcrumb-item::before {
291
	width: 16px;
292
	height: 22px;
293 294 295
	display: flex;
	align-items: center;
	justify-content: center;
J
Johannes Rieken 已提交
296 297
}

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