Skip to content

Commit 5a48e90

Browse files
committed
(less) Merge pull request twbs#12286 from watilde/fixes-panel
Fixes twbs#12263: Remove border radius when it's not both ends in panel
2 parents 687fe1a + 91d0fb9 commit 5a48e90

File tree

1 file changed

+39
-7
lines changed

1 file changed

+39
-7
lines changed

panels.less

+39-7
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,28 @@
2727
.panel {
2828
> .list-group {
2929
margin-bottom: 0;
30-
3130
.list-group-item {
3231
border-width: 1px 0;
33-
34-
// Remove border radius for top one
32+
border-radius: 0;
3533
&:first-child {
36-
.border-top-radius(0);
34+
border-top: 0;
3735
}
38-
// But keep it for the last one
3936
&:last-child {
4037
border-bottom: 0;
4138
}
4239
}
40+
// Add border top radius for first one
41+
&:first-child {
42+
.list-group-item:first-child {
43+
.border-top-radius((@panel-border-radius - 1));
44+
}
45+
}
46+
// Add border bottom radius for last one
47+
&:last-child {
48+
.list-group-item:last-child {
49+
.border-bottom-radius((@panel-border-radius - 1));
50+
}
51+
}
4352
}
4453
}
4554
// Collapse space between when there's no additional content.
@@ -59,7 +68,27 @@
5968
> .table,
6069
> .table-responsive > .table {
6170
margin-bottom: 0;
62-
71+
}
72+
// Add border top radius for first one
73+
> .table:first-child,
74+
> .table-responsive:first-child > .table:first-child {
75+
> thead:first-child,
76+
> tbody:first-child {
77+
> tr:first-child {
78+
td:first-child,
79+
th:first-child {
80+
border-top-left-radius: (@panel-border-radius - 1);
81+
}
82+
td:last-child,
83+
th:last-child {
84+
border-top-right-radius: (@panel-border-radius - 1);
85+
}
86+
}
87+
}
88+
}
89+
// Add border bottom radius for last one
90+
> .table:last-child,
91+
> .table-responsive:last-child > .table:last-child {
6392
> tbody:last-child,
6493
> tfoot:last-child {
6594
> tr:last-child {
@@ -97,7 +126,10 @@
97126
> td:last-child {
98127
border-right: 0;
99128
}
100-
129+
&:first-child > th,
130+
&:first-child > td {
131+
border-top: 0;
132+
}
101133
&:last-child > th,
102134
&:last-child > td {
103135
border-bottom: 0;

0 commit comments

Comments
 (0)