Skip to content

Commit 98c3588

Browse files
authored
Merge pull request #98 from orderedlist/fix-tab-dragging
Update tab styles
2 parents 254b5a6 + a64c8c0 commit 98c3588

File tree

1 file changed

+33
-6
lines changed

1 file changed

+33
-6
lines changed

styles/tabs.less

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,26 @@
33
border-bottom:1px solid #b7b5b7;
44
border-radius: 0;
55
font-size:@font-size - 1;
6-
height:24px;
6+
height:@tab-height;
7+
overflow: hidden;
78
background: linear-gradient(@tab-background-color,#C7C6C7);
8-
display:table;
9-
table-layout: fixed;
109
width:100%;
1110
padding:0;
1211
-webkit-transform:scale(1);
1312

1413
.tab {
1514
width:100%;
15+
max-width: 100%;
1616
box-sizing:border-box;
1717
padding:0 20px!important;
18-
line-height:22px;
18+
line-height:@tab-height;
19+
height: @tab-height;
1920
color:#696869;
2021
text-align:center;
2122
position:relative;
2223
border-left:1px solid #a4a2a4;
23-
display:table-cell;
2424
background: linear-gradient(#c2c0c2, #bbb9bb);
25+
flex: 1;
2526

2627
&:first-child {
2728
border-left:none;
@@ -51,6 +52,7 @@
5152
border-left-color:#a2a1a2;
5253
border-bottom-color:#A8A7A8;
5354
width:100%;
55+
flex: 1;
5456

5557
& .title {
5658
padding:0;
@@ -68,7 +70,7 @@
6870
.tab .close-icon {
6971
color:rgb(93, 93, 93) !important;
7072
cursor:default;
71-
top:3px;
73+
top:4px;
7274
left:4px;
7375
height:16px;
7476
width:16px;
@@ -135,4 +137,29 @@
135137
.icon:before {
136138
margin-right:3px;
137139
}
140+
141+
// Dragging ----------------------
142+
143+
.tab.is-dragging {
144+
opacity: .5;
145+
.close-icon,
146+
&:before {
147+
visibility: hidden;
148+
}
149+
}
150+
151+
.placeholder {
152+
margin: 0;
153+
height: @tab-height;
154+
background: @background-color-selected;
155+
pointer-events: none;
156+
157+
&:last-child {
158+
margin-left: -2px;
159+
}
160+
161+
&:first-child {
162+
margin-left: 1px;
163+
}
164+
}
138165
}

0 commit comments

Comments
 (0)