tabstitlecontrol.css 13.0 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 56 57
	width: 120px;
	min-width: fit-content;
}

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

65 66
.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 已提交
67
	content: '';
68 69 70 71 72
	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) */
}

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

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

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

86
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.close-button-left {
87
	flex-direction: row-reverse;
88
	padding-left: 0;
89
	padding-right: 10px;
90 91
}

B
Benjamin Pasero 已提交
92 93
/* Tab border top/bottom */

94 95
.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 已提交
96 97 98
	display: none; /* hidden by default until a color is provided (see below) */
}

99 100 101
.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 已提交
102 103 104
	display: block;
	position: absolute;
	left: 0;
105
	z-index: 6; /* over possible title border */
B
Benjamin Pasero 已提交
106 107
	pointer-events: none;
	width: 100%;
A
Alexander 已提交
108 109
}

110
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active.tab-border-top > .tab-border-top-container {
A
Alexander 已提交
111
	top: 0;
B
Benjamin Pasero 已提交
112
	height: 1px;
A
Alexander 已提交
113
	background-color: var(--tab-border-top-color);
B
Benjamin Pasero 已提交
114 115
}

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

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

128 129
/* Tab Label */

130
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab .tab-label {
131 132 133 134
	margin-top: auto;
	margin-bottom: auto;
}

135
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink .tab-label {
136 137 138
	position: relative;
}

139
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container >  .tab.sizing-shrink > .tab-label::after {
B
Benjamin Pasero 已提交
140
	content: '';
141 142 143
	position: absolute;
	right: 0;
	height: 100%;
144
	width: 5px;
145 146 147 148
	opacity: 1;
	padding: 0;
}

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

153 154
.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 {
155 156 157
	overflow: visible; /* fixes https://github.com/Microsoft/vscode/issues/20182 */
}

158
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink > .monaco-icon-label > .monaco-icon-label-description-container {
159 160 161
	text-overflow: clip;
}

162
.hc-black .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.sizing-shrink > .monaco-icon-label > .monaco-icon-label-description-container {
163 164 165
	text-overflow: ellipsis;
}

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

B
Benjamin Pasero 已提交
170 171
/* Tab Close */

172
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab > .tab-close {
B
Benjamin Pasero 已提交
173 174 175
	margin-top: auto;
	margin-bottom: auto;
	width: 28px;
B
Benjamin Pasero 已提交
176 177
}

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

183 184 185
.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 已提交
186
	overflow: visible; /* ...but still show the close button on hover, focus and when dirty */
187 188
}

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

193 194 195 196 197
.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 已提交
198 199 200
	opacity: 1;
}

M
Miguel Solorio 已提交
201 202 203 204
/* change close icon to dirty state icon */
.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 {
	content: "\ea71"; /* use `circle-filled` icon unicode */
205 206
}

207 208 209 210
.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 已提交
211 212 213
	opacity: 0.5;
}

214
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab > .tab-close .action-label {
B
Benjamin Pasero 已提交
215 216 217 218 219 220 221 222
	opacity: 0;
	display: block;
	height: 16px;
	width: 16px;
	background-size: 16px;
	background-position: center center;
	background-repeat: no-repeat;
	margin-right: 0.5em;
223 224
}

B
Benjamin Pasero 已提交
225 226
/* No Tab Close Button */

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

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

M
Miguel Solorio 已提交
235 236 237 238
.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 */
}

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

243 244 245 246
.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 */
}

247
/* Editor Actions */
248

249
.monaco-workbench .part.editor > .content .editor-group-container > .title .editor-actions {
B
Benjamin Pasero 已提交
250
	cursor: default;
B
wip  
Benjamin Pasero 已提交
251
	flex: initial;
M
Miguel Solorio 已提交
252
	padding: 0 8px 0 4px;
253 254 255 256 257
	height: 35px;
}

/* Breadcrumbs */

258
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs .breadcrumbs-control {
259
	flex: 1 100%;
260
	height: 22px;
J
Johannes Rieken 已提交
261
	cursor: default;
262
}
263

264
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs .breadcrumbs-control .monaco-icon-label {
265 266 267 268
	height: 22px;
	line-height: 22px;
}

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

273
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs  .breadcrumbs-control .monaco-breadcrumb-item {
274
	max-width: 80%;
275 276
}

277
.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-breadcrumbs  .breadcrumbs-control .monaco-breadcrumb-item::before {
J
Johannes Rieken 已提交
278
	min-width: 16px;
279
	height: 22px;
J
Johannes Rieken 已提交
280 281
}

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