tabstitlecontrol.css 13.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
.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 27
}

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

32
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container::-webkit-scrollbar {
B
Benjamin Pasero 已提交
33 34 35 36 37
	display: none;
}

/* Tab */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

135 136
/* Tab Label */

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

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

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

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

160 161
.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 {
162 163 164
	overflow: visible; /* fixes https://github.com/Microsoft/vscode/issues/20182 */
}

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

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

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

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

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

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

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

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

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

M
Miguel Solorio 已提交
208
/* change close icon to dirty state icon */
M
Miguel Solorio 已提交
209 210
.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 已提交
211
	content: "\ea71"; /* use `circle-filled` icon unicode */
212 213
}

214 215 216 217
.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 已提交
218 219 220
	opacity: 0.5;
}

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

B
Benjamin Pasero 已提交
232 233
/* No Tab Close Button */

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

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

M
Miguel Solorio 已提交
242
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-off.dirty-border-top > .tab-close,
M
Miguel Solorio 已提交
243 244 245 246
.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 */
}

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

251 252 253 254
.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 */
}

255
/* Editor Actions */
256

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

/* Breadcrumbs */

266
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs .breadcrumbs-control {
267
	flex: 1 100%;
268
	height: 22px;
J
Johannes Rieken 已提交
269
	cursor: default;
270
}
271

272
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs .breadcrumbs-control .monaco-icon-label {
273 274 275 276
	height: 22px;
	line-height: 22px;
}

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

281
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs  .breadcrumbs-control .monaco-breadcrumb-item {
282
	max-width: 80%;
283 284
}

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

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