-
Notifications
You must be signed in to change notification settings - Fork 2.5k
/
Copy pathtabs.css
269 lines (223 loc) · 8.57 KB
/
tabs.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
/*-----------------------------------------------------------------------------
| Variables
|----------------------------------------------------------------------------*/
:root {
/* These need to be root because tabs get attached to the body during dragging. */
--theia-private-horizontal-tab-height: 28.5px;
--theia-private-horizontal-tab-scrollbar-rail-height: 7px;
--theia-private-horizontal-tab-scrollbar-height: 5px;
}
/*-----------------------------------------------------------------------------
| General tab bar style
|----------------------------------------------------------------------------*/
.p-TabBar {
color: var(--theia-ui-font-color1);
background: var(--theia-layout-color1);
font-size: var(--theia-ui-font-size1);
cursor: pointer;
}
.p-TabBar[data-orientation='horizontal'].theia-app-bottom {
background: var(--theia-layout-color0);
}
.p-TabBar[data-orientation='horizontal'].theia-app-bottom .p-TabBar-tab {
background: var(--theia-layout-color0);
}
.p-TabBar[data-orientation='horizontal'].theia-app-bottom .p-TabBar-tab.p-mod-current {
background: var(--theia-layout-color0);
border-top: var(--theia-border-width) solid var(--theia-ui-font-color2);
}
.p-TabBar[data-orientation='horizontal'].theia-app-bottom .p-TabBar-tab.p-mod-current.theia-mod-active {
border-top-color: var(--theia-accent-color2);
}
.p-TabBar[data-orientation='horizontal'] {
overflow-x: hidden;
overflow-y: hidden;
min-height: calc(var(--theia-private-horizontal-tab-height) + var(--theia-private-horizontal-tab-scrollbar-rail-height) / 2);
}
.p-TabBar[data-orientation='horizontal'] .p-TabBar-content {
flex: none;
align-items: flex-end;
z-index: 1;
}
.p-TabBar[data-orientation='horizontal'] .p-TabBar-tab {
flex: none;
height: calc(var(--theia-private-horizontal-tab-height) + var(--theia-private-horizontal-tab-scrollbar-rail-height) / 2);
min-width: 35px;
line-height: var(--theia-private-horizontal-tab-height);
padding: 0px 8px;
background: var(--theia-layout-color2);
align-items: center;
}
.p-TabBar[data-orientation='horizontal'] .p-TabBar-tab:last-child {
border-right: var(--theia-border-width) solid var(--theia-border-color0);
}
.p-TabBar[data-orientation='horizontal'] .p-TabBar-tab:hover:not(.p-mod-current) {
background: var(--theia-accent-color3);
}
/*-----------------------------------------------------------------------------
| Tabs in the center area (main and bottom)
|----------------------------------------------------------------------------*/
/* This is a current tab of a tab bar: each tab bar has 1. */
.p-TabBar .p-TabBar-tab.p-mod-current {
min-height: calc(var(--theia-private-horizontal-tab-height) + var(--theia-border-width));
background: var(--theia-layout-color0);
color: var(--theia-ui-font-color0);
border-top: var(--theia-border-width) solid var(--theia-layout-color0);
}
/* This is the main application level active tab: only 1 exists. */
.p-TabBar .p-TabBar-tab.p-mod-current.theia-mod-active {
border-top-color: var(--theia-accent-color2);
}
.p-TabBar.theia-app-centers .p-TabBar-tabIcon,
.p-TabBar.theia-app-centers .p-TabBar-tabLabel,
.p-TabBar.theia-app-centers .p-TabBar-tabCloseIcon {
display: inline-block;
}
.p-TabBar-tab-secondary-label {
color: var(--theia-brand-color2);
cursor: pointer;
font-size: var(--theia-ui-font-size0);
margin-left: 5px;
text-decoration-line: underline;
-webkit-appearance: none;
-moz-appearance: none;
background-image: linear-gradient(45deg, transparent 50%, var(--theia-ui-font-color1) 50%), linear-gradient(135deg, var(--theia-ui-font-color1) 50%, transparent 50%);
background-position: calc(100% - 6px) 8px, calc(100% - 2px) 8px, 100% 0;
background-size: 4px 5px;
background-repeat: no-repeat;
padding: 2px 14px 0 0;
}
.p-TabBar .p-TabBar-tabIcon {
width: 15px;
line-height: 1.7;
font-size: 12px;
text-align: center;
background-repeat: no-repeat;
}
.p-TabBar.theia-app-centers .p-TabBar-tabIcon {
height: 15px;
background-size: 13px;
background-position-y: 3px;
background-color: var(--theia-tab-icon-color);
-webkit-mask-repeat: no-repeat;
-webkit-mask-size: 13px;
-webkit-mask-position-y: 1px;
mask-repeat: no-repeat;
mask-size: 13px;
mask-position: 0 1px;
padding-right: 2px;
}
.p-TabBar[data-orientation='horizontal'] .file-icon.p-TabBar-tabIcon {
background: none;
padding-bottom: 0px;
padding-right: 0;
min-height: 20px;
}
.p-TabBar[data-orientation='horizontal'] .fa.p-TabBar-tabIcon {
background: none;
padding-bottom: 6px;
min-height: 0;
}
.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable > .p-TabBar-tabCloseIcon {
padding-left: 10px;
height: 16px;
width: 16px;
background-size: 13px;
background-position: center;
background-repeat: no-repeat;
}
.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable {
padding-right: 2px;
}
.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable:hover > .p-TabBar-tabCloseIcon,
.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-current > .p-TabBar-tabCloseIcon {
background-image: var(--theia-icon-close);
}
.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable.theia-mod-dirty > .p-TabBar-tabCloseIcon {
background-size: 10px;
background-image: var(--theia-icon-circle);
}
.p-TabBar.theia-app-centers .p-TabBar-tab.p-mod-closable.theia-mod-dirty > .p-TabBar-tabCloseIcon:hover {
background-size: 13px;
background-image: var(--theia-icon-close);
}
.p-TabBar.theia-app-centers .p-TabBar-tab > .p-TabBar-tabIcon.no-icon {
display: none;
}
/*-----------------------------------------------------------------------------
| Perfect scrollbar
|----------------------------------------------------------------------------*/
.p-TabBar[data-orientation='horizontal'] > .p-TabBar-content-container > .ps__rail-x {
height: var(--theia-private-horizontal-tab-scrollbar-rail-height);
z-index: 1000;
}
.p-TabBar[data-orientation='horizontal'] > .p-TabBar-content-container > .ps__rail-x > .ps__thumb-x {
height: var(--theia-private-horizontal-tab-scrollbar-height) !important;
bottom: calc((var(--theia-private-horizontal-tab-scrollbar-rail-height) - var(--theia-private-horizontal-tab-scrollbar-height)) / 2);
}
.p-TabBar[data-orientation='horizontal'] > .p-TabBar-content-container > .ps__rail-x:hover,
.p-TabBar[data-orientation='horizontal'] > .p-TabBar-content-container > .ps__rail-x:focus {
height: var(--theia-private-horizontal-tab-scrollbar-rail-height) !important;
}
.p-TabBar[data-orientation='horizontal'] > .p-TabBar-content-container > .ps__rail-x:hover > .ps__thumb-x,
.p-TabBar[data-orientation='horizontal'] > .p-TabBar-content-container > .ps__rail-x:focus > .ps__thumb-x {
height: calc(var(--theia-private-horizontal-tab-scrollbar-height) / 2) !important;
bottom: calc((var(--theia-private-horizontal-tab-scrollbar-rail-height) - var(--theia-private-horizontal-tab-scrollbar-height)) / 2);
}
/*-----------------------------------------------------------------------------
| Dragged tabs
|----------------------------------------------------------------------------*/
.p-TabBar-tab.p-mod-drag-image {
transform: translateX(-40%) translateY(-58%);
opacity: 0.8;
min-height: var(--theia-private-horizontal-tab-height);
padding: 0px 10px;
font-size: var(--theia-ui-font-size1);
line-height: var(--theia-private-horizontal-tab-height);
color: var(--theia-ui-font-color1);
background: var(--theia-layout-color4);
border: var(--theia-border-width) solid var(--theia-border-color1);
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
.p-TabBar-tab.p-mod-drag-image > .p-TabBar-tabIcon,
.p-TabBar-tab.p-mod-drag-image > .p-TabBar-tabLabel {
display: inline-block;
}
.p-TabBar-tab.p-mod-drag-image > .p-TabBar-tabIcon.no-icon {
display: none;
}
.p-TabBar-tab.p-mod-drag-image > .p-TabBar-tabIcon {
width: 15px;
line-height: 1.7;
}
/*-----------------------------------------------------------------------------
| Tab-bar toolbar
|----------------------------------------------------------------------------*/
.p-TabBar-toolbar {
z-index: 1001; /* Due to the scrollbar (`z-index: 1000;`) it has a greater `z-index`. */
display: flex;
flex-direction: row-reverse;
padding: 4px;
padding-left: 0px;
margin-right: 4px;
}
.p-TabBar-content-container {
display: flex;
flex: 1;
}
.p-TabBar-toolbar .item {
display: flex;
align-items: center;
margin-left: 8px; /* `padding` + `margin-right` from the container toolbar */
opacity: 0.25;
cursor: default;
}
.p-TabBar-toolbar .item.enabled {
opacity: 1.0;
cursor: pointer;
}
.p-TabBar-toolbar .item > div{
height: 18px;
width: 18px;
background-repeat: no-repeat;
}