forked from atom/atom-dark-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtabs.less
152 lines (129 loc) · 3.42 KB
/
tabs.less
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
@import "ui-variables";
@tab-radius: 3px;
@modified-icon-width: 8px;
@tab-skew: 30deg;
@tab-top-padding: 5px;
@tab-bottom-border-height: 5px;
@tab-border: 1px solid @tab-border-color;
@tab-bar-bottom-border-color: #111;
@tab-max-width: 160px;
.tab-bar {
height: @tab-height + @tab-top-padding + @tab-bottom-border-height;
background: @tab-bar-background-color;
box-shadow: inset 0 -8px 8px -4px rgba(0,0,0, .15);
padding: 0 10px 0 25px;
overflow-x: auto;
overflow-y: hidden;
&::-webkit-scrollbar {
display: none;
}
&:after {
content: "";
position: absolute;
bottom: 0;
height: @tab-bottom-border-height;
left: 0;
right: 0;
background-color: @tab-background-color-active;
border-top: 1px solid @tab-border-color;
border-bottom: 1px solid @tab-bar-bottom-border-color;
pointer-events: none;
}
.tab {
position: relative;
top: @tab-top-padding;
max-width: @tab-max-width;
height: @tab-height;
line-height: @tab-height;
padding: 0;
margin: 0 20px 0 5px;
color: @text-color;
transition: color .1s ease-in;
border: none;
&, &:before, &:after {
background-image: -webkit-linear-gradient(top, lighten(#333, 7%), #333);
height: @tab-height;
}
&:before, &:after {
content: '';
position: absolute;
top: 0px;
width: 25px;
height: @tab-height;
}
// left angled edge
&:before {
left: -14px;
border-top-left-radius: @tab-radius;
box-shadow: inset 1px 1px 0 @tab-border-color, -4px 0px 4px rgba(0,0,0,.1);
-webkit-transform: skewX(-@tab-skew);
}
// right angled edge
&:after {
right: -14px;
border-top-right-radius: @tab-radius;
box-shadow: inset -1px 1px 0 @tab-border-color, 4px 0px 4px rgba(0,0,0,.1);
-webkit-transform: skewX(@tab-skew);
}
.close-icon {
right: 0;
z-index: 3;
text-align: right;
line-height: @tab-height;
color: @text-color;
&:hover {
color: inherit;
}
}
&.modified:not(:hover) .close-icon {
right: 0;
top: @tab-height/2 - @modified-icon-width/2 + 1px;
width: @modified-icon-width;
height: @modified-icon-width;
}
&.modified:hover .close-icon:hover {
color: @text-color-highlight;
}
.title{
position: relative;
z-index: 1;
padding-right: 10px
}
}
.tab.active {
z-index: 1;
color: @text-color-highlight;
box-shadow: inset -1px 1px 0 @tab-border-color, 4px -4px 4px rgba(0,0,0,.1);
.close-icon {
line-height: @tab-height - 1px;
color: @text-color;
}
&, &:before, &:after {
background-image: -webkit-linear-gradient(top, lighten(@tab-background-color-active, 7%), @tab-background-color-active);
height: @tab-height + 1px;
}
&:before {
box-shadow: inset 1px 1px 0 @tab-border-color, -4px -4px 4px rgba(0,0,0,.1);
}
&:after {
box-shadow: inset -1px 1px 0 @tab-border-color, 4px -4px 4px rgba(0,0,0,.1);
}
}
.tab:hover {
color: @text-color-highlight;
}
.tab.active:hover .close-icon {
color: @text-color;
&:hover {
color: inherit;
}
}
.placeholder {
height: @tab-height + @tab-top-padding + @tab-bottom-border-height;
margin-left: -9px; // center between tabs
pointer-events: none;
&:after {
top: @tab-height + @tab-top-padding + @tab-bottom-border-height - 2px;
}
}
}