0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-26 23:54:23 +01:00

remove single corner border-radius mixins

This commit is contained in:
Mark Otto 2012-12-01 14:25:28 -08:00
parent dd11d0a3fa
commit 19ee7999f4
4 changed files with 55 additions and 137 deletions

View File

@ -1715,62 +1715,46 @@ table {
.table-bordered thead:first-child tr:first-child th:first-child, .table-bordered thead:first-child tr:first-child th:first-child,
.table-bordered tbody:first-child tr:first-child td:first-child { .table-bordered tbody:first-child tr:first-child td:first-child {
-webkit-border-top-left-radius: 4px; border-top-left-radius: 4px;
border-top-left-radius: 4px;
-moz-border-radius-topleft: 4px;
} }
.table-bordered thead:first-child tr:first-child th:last-child, .table-bordered thead:first-child tr:first-child th:last-child,
.table-bordered tbody:first-child tr:first-child td:last-child { .table-bordered tbody:first-child tr:first-child td:last-child {
-webkit-border-top-right-radius: 4px; border-top-right-radius: 4px;
border-top-right-radius: 4px;
-moz-border-radius-topright: 4px;
} }
.table-bordered thead:last-child tr:last-child th:first-child, .table-bordered thead:last-child tr:last-child th:first-child,
.table-bordered tbody:last-child tr:last-child td:first-child, .table-bordered tbody:last-child tr:last-child td:first-child,
.table-bordered tfoot:last-child tr:last-child td:first-child { .table-bordered tfoot:last-child tr:last-child td:first-child {
-webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
border-bottom-left-radius: 4px;
-moz-border-radius-bottomleft: 4px;
} }
.table-bordered thead:last-child tr:last-child th:last-child, .table-bordered thead:last-child tr:last-child th:last-child,
.table-bordered tbody:last-child tr:last-child td:last-child, .table-bordered tbody:last-child tr:last-child td:last-child,
.table-bordered tfoot:last-child tr:last-child td:last-child { .table-bordered tfoot:last-child tr:last-child td:last-child {
-webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px;
border-bottom-right-radius: 4px;
-moz-border-radius-bottomright: 4px;
} }
.table-bordered tfoot + tbody:last-child tr:last-child td:first-child { .table-bordered tfoot + tbody:last-child tr:last-child td:first-child {
-webkit-border-bottom-left-radius: 0; border-bottom-left-radius: 0;
border-bottom-left-radius: 0;
-moz-border-radius-bottomleft: 0;
} }
.table-bordered tfoot + tbody:last-child tr:last-child td:last-child { .table-bordered tfoot + tbody:last-child tr:last-child td:last-child {
-webkit-border-bottom-right-radius: 0; border-bottom-right-radius: 0;
border-bottom-right-radius: 0;
-moz-border-radius-bottomright: 0;
} }
.table-bordered caption + thead tr:first-child th:first-child, .table-bordered caption + thead tr:first-child th:first-child,
.table-bordered caption + tbody tr:first-child td:first-child, .table-bordered caption + tbody tr:first-child td:first-child,
.table-bordered colgroup + thead tr:first-child th:first-child, .table-bordered colgroup + thead tr:first-child th:first-child,
.table-bordered colgroup + tbody tr:first-child td:first-child { .table-bordered colgroup + tbody tr:first-child td:first-child {
-webkit-border-top-left-radius: 4px; border-top-left-radius: 4px;
border-top-left-radius: 4px;
-moz-border-radius-topleft: 4px;
} }
.table-bordered caption + thead tr:first-child th:last-child, .table-bordered caption + thead tr:first-child th:last-child,
.table-bordered caption + tbody tr:first-child td:last-child, .table-bordered caption + tbody tr:first-child td:last-child,
.table-bordered colgroup + thead tr:first-child th:last-child, .table-bordered colgroup + thead tr:first-child th:last-child,
.table-bordered colgroup + tbody tr:first-child td:last-child { .table-bordered colgroup + tbody tr:first-child td:last-child {
-webkit-border-top-right-radius: 4px; border-top-right-radius: 4px;
border-top-right-radius: 4px;
-moz-border-radius-topright: 4px;
} }
.table-striped tbody tr:nth-child(odd) td, .table-striped tbody tr:nth-child(odd) td,
@ -3152,42 +3136,26 @@ input[type="button"].btn-block {
.btn-group > .btn:first-child { .btn-group > .btn:first-child {
margin-left: 0; margin-left: 0;
-webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
border-bottom-left-radius: 4px; border-top-left-radius: 4px;
-webkit-border-top-left-radius: 4px;
border-top-left-radius: 4px;
-moz-border-radius-bottomleft: 4px;
-moz-border-radius-topleft: 4px;
} }
.btn-group > .btn:last-child, .btn-group > .btn:last-child,
.btn-group > .dropdown-toggle { .btn-group > .dropdown-toggle {
-webkit-border-top-right-radius: 4px; border-top-right-radius: 4px;
border-top-right-radius: 4px; border-bottom-right-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
border-bottom-right-radius: 4px;
-moz-border-radius-topright: 4px;
-moz-border-radius-bottomright: 4px;
} }
.btn-group > .btn.large:first-child { .btn-group > .btn.large:first-child {
margin-left: 0; margin-left: 0;
-webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px;
border-bottom-left-radius: 6px; border-top-left-radius: 6px;
-webkit-border-top-left-radius: 6px;
border-top-left-radius: 6px;
-moz-border-radius-bottomleft: 6px;
-moz-border-radius-topleft: 6px;
} }
.btn-group > .btn.large:last-child, .btn-group > .btn.large:last-child,
.btn-group > .large.dropdown-toggle { .btn-group > .large.dropdown-toggle {
-webkit-border-top-right-radius: 6px; border-top-right-radius: 6px;
border-top-right-radius: 6px; border-bottom-right-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
border-bottom-right-radius: 6px;
-moz-border-radius-topright: 6px;
-moz-border-radius-bottomright: 6px;
} }
.btn-group > .btn:hover, .btn-group > .btn:hover,
@ -3540,12 +3508,8 @@ input[type="button"].btn-block {
} }
.nav-tabs .dropdown-menu { .nav-tabs .dropdown-menu {
-webkit-border-top-right-radius: 0; border-top-right-radius: 0;
border-top-right-radius: 0; border-top-left-radius: 0;
-webkit-border-top-left-radius: 0;
border-top-left-radius: 0;
-moz-border-radius-topright: 0;
-moz-border-radius-topleft: 0;
} }
.nav .dropdown-toggle .caret { .nav .dropdown-toggle .caret {
@ -4230,22 +4194,14 @@ input[type="button"].btn-block {
.pagination ul > li:first-child > a, .pagination ul > li:first-child > a,
.pagination ul > li:first-child > span { .pagination ul > li:first-child > span {
border-left-width: 1px; border-left-width: 1px;
-webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
border-bottom-left-radius: 4px; border-top-left-radius: 4px;
-webkit-border-top-left-radius: 4px;
border-top-left-radius: 4px;
-moz-border-radius-bottomleft: 4px;
-moz-border-radius-topleft: 4px;
} }
.pagination ul > li:last-child > a, .pagination ul > li:last-child > a,
.pagination ul > li:last-child > span { .pagination ul > li:last-child > span {
-webkit-border-top-right-radius: 4px; border-top-right-radius: 4px;
border-top-right-radius: 4px; border-bottom-right-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
border-bottom-right-radius: 4px;
-moz-border-radius-topright: 4px;
-moz-border-radius-bottomright: 4px;
} }
.pagination-centered { .pagination-centered {
@ -4264,46 +4220,30 @@ input[type="button"].btn-block {
.pagination-large ul > li:first-child > a, .pagination-large ul > li:first-child > a,
.pagination-large ul > li:first-child > span { .pagination-large ul > li:first-child > span {
-webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px;
border-bottom-left-radius: 6px; border-top-left-radius: 6px;
-webkit-border-top-left-radius: 6px;
border-top-left-radius: 6px;
-moz-border-radius-bottomleft: 6px;
-moz-border-radius-topleft: 6px;
} }
.pagination-large ul > li:last-child > a, .pagination-large ul > li:last-child > a,
.pagination-large ul > li:last-child > span { .pagination-large ul > li:last-child > span {
-webkit-border-top-right-radius: 6px; border-top-right-radius: 6px;
border-top-right-radius: 6px; border-bottom-right-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
border-bottom-right-radius: 6px;
-moz-border-radius-topright: 6px;
-moz-border-radius-bottomright: 6px;
} }
.pagination-mini ul > li:first-child > a, .pagination-mini ul > li:first-child > a,
.pagination-small ul > li:first-child > a, .pagination-small ul > li:first-child > a,
.pagination-mini ul > li:first-child > span, .pagination-mini ul > li:first-child > span,
.pagination-small ul > li:first-child > span { .pagination-small ul > li:first-child > span {
-webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px;
border-bottom-left-radius: 3px; border-top-left-radius: 3px;
-webkit-border-top-left-radius: 3px;
border-top-left-radius: 3px;
-moz-border-radius-bottomleft: 3px;
-moz-border-radius-topleft: 3px;
} }
.pagination-mini ul > li:last-child > a, .pagination-mini ul > li:last-child > a,
.pagination-small ul > li:last-child > a, .pagination-small ul > li:last-child > a,
.pagination-mini ul > li:last-child > span, .pagination-mini ul > li:last-child > span,
.pagination-small ul > li:last-child > span { .pagination-small ul > li:last-child > span {
-webkit-border-top-right-radius: 3px; border-top-right-radius: 3px;
border-top-right-radius: 3px; border-bottom-right-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
border-bottom-right-radius: 3px;
-moz-border-radius-topright: 3px;
-moz-border-radius-bottomright: 3px;
} }
.pagination-small ul > li > a, .pagination-small ul > li > a,

View File

@ -57,25 +57,25 @@
// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
.btn-group > .btn:first-child { .btn-group > .btn:first-child {
margin-left: 0; margin-left: 0;
.border-top-left-radius(@border-radius-base); border-top-left-radius: @border-radius-base;
.border-bottom-left-radius(@border-radius-base); border-bottom-left-radius: @border-radius-base;
} }
// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
.btn-group > .btn:last-child, .btn-group > .btn:last-child,
.btn-group > .dropdown-toggle { .btn-group > .dropdown-toggle {
.border-top-right-radius(@border-radius-base); border-top-right-radius: @border-radius-base;
.border-bottom-right-radius(@border-radius-base); border-bottom-right-radius: @border-radius-base;
} }
// Reset corners for large buttons // Reset corners for large buttons
.btn-group > .btn.large:first-child { .btn-group > .btn.large:first-child {
margin-left: 0; margin-left: 0;
.border-top-left-radius(@border-radius-large); border-top-left-radius: @border-radius-large;
.border-bottom-left-radius(@border-radius-large); border-bottom-left-radius: @border-radius-large;
} }
.btn-group > .btn.large:last-child, .btn-group > .btn.large:last-child,
.btn-group > .large.dropdown-toggle { .btn-group > .large.dropdown-toggle {
.border-top-right-radius(@border-radius-large); border-top-right-radius: @border-radius-large;
.border-bottom-right-radius(@border-radius-large); border-bottom-right-radius: @border-radius-large;
} }
// On hover/focus/active, bring the proper btn to front // On hover/focus/active, bring the proper btn to front

View File

@ -173,44 +173,22 @@
// CSS3 PROPERTIES // CSS3 PROPERTIES
// -------------------------------------------------- // --------------------------------------------------
// Single Corner Border Radius // Single side border-radius
.border-top-left-radius(@radius) {
-webkit-border-top-left-radius: @radius;
-moz-border-radius-topleft: @radius;
border-top-left-radius: @radius;
}
.border-top-right-radius(@radius) {
-webkit-border-top-right-radius: @radius;
-moz-border-radius-topright: @radius;
border-top-right-radius: @radius;
}
.border-bottom-right-radius(@radius) {
-webkit-border-bottom-right-radius: @radius;
-moz-border-radius-bottomright: @radius;
border-bottom-right-radius: @radius;
}
.border-bottom-left-radius(@radius) {
-webkit-border-bottom-left-radius: @radius;
-moz-border-radius-bottomleft: @radius;
border-bottom-left-radius: @radius;
}
// Single Side Border Radius
.border-top-radius(@radius) { .border-top-radius(@radius) {
.border-top-right-radius(@radius); border-top-right-radius: @radius;
.border-top-left-radius(@radius); border-top-left-radius: @radius;
} }
.border-right-radius(@radius) { .border-right-radius(@radius) {
.border-top-right-radius(@radius); border-bottom-right-radius: @radius;
.border-bottom-right-radius(@radius); border-top-right-radius: @radius;
} }
.border-bottom-radius(@radius) { .border-bottom-radius(@radius) {
.border-bottom-right-radius(@radius); border-bottom-right-radius: @radius;
.border-bottom-left-radius(@radius); border-bottom-left-radius: @radius;
} }
.border-left-radius(@radius) { .border-left-radius(@radius) {
.border-top-left-radius(@radius); border-bottom-left-radius: @radius;
.border-bottom-left-radius(@radius); border-top-left-radius: @radius;
} }
// Drop shadows // Drop shadows

View File

@ -90,30 +90,30 @@ table {
// For first th or td in the first row in the first thead or tbody // For first th or td in the first row in the first thead or tbody
thead:first-child tr:first-child th:first-child, thead:first-child tr:first-child th:first-child,
tbody:first-child tr:first-child td:first-child { tbody:first-child tr:first-child td:first-child {
.border-top-left-radius(@border-radius-base); border-top-left-radius: @border-radius-base;
} }
thead:first-child tr:first-child th:last-child, thead:first-child tr:first-child th:last-child,
tbody:first-child tr:first-child td:last-child { tbody:first-child tr:first-child td:last-child {
.border-top-right-radius(@border-radius-base); border-top-right-radius: @border-radius-base;
} }
// For first th or td in the last row in the last thead or tbody // For first th or td in the last row in the last thead or tbody
thead:last-child tr:last-child th:first-child, thead:last-child tr:last-child th:first-child,
tbody:last-child tr:last-child td:first-child, tbody:last-child tr:last-child td:first-child,
tfoot:last-child tr:last-child td:first-child { tfoot:last-child tr:last-child td:first-child {
.border-bottom-left-radius(@border-radius-base); border-bottom-left-radius: @border-radius-base;
} }
thead:last-child tr:last-child th:last-child, thead:last-child tr:last-child th:last-child,
tbody:last-child tr:last-child td:last-child, tbody:last-child tr:last-child td:last-child,
tfoot:last-child tr:last-child td:last-child { tfoot:last-child tr:last-child td:last-child {
.border-bottom-right-radius(@border-radius-base); border-bottom-right-radius: @border-radius-base;
} }
// Clear border-radius for first and last td in the last row in the last tbody for table with tfoot // Clear border-radius for first and last td in the last row in the last tbody for table with tfoot
tfoot + tbody:last-child tr:last-child td:first-child { tfoot + tbody:last-child tr:last-child td:first-child {
.border-bottom-left-radius(0); border-bottom-left-radius: 0;
} }
tfoot + tbody:last-child tr:last-child td:last-child { tfoot + tbody:last-child tr:last-child td:last-child {
.border-bottom-right-radius(0); border-bottom-right-radius: 0;
} }
@ -122,13 +122,13 @@ table {
caption + tbody tr:first-child td:first-child, caption + tbody tr:first-child td:first-child,
colgroup + thead tr:first-child th:first-child, colgroup + thead tr:first-child th:first-child,
colgroup + tbody tr:first-child td:first-child { colgroup + tbody tr:first-child td:first-child {
.border-top-left-radius(@border-radius-base); border-top-left-radius: @border-radius-base;
} }
caption + thead tr:first-child th:last-child, caption + thead tr:first-child th:last-child,
caption + tbody tr:first-child td:last-child, caption + tbody tr:first-child td:last-child,
colgroup + thead tr:first-child th:last-child, colgroup + thead tr:first-child th:last-child,
colgroup + tbody tr:first-child td:last-child { colgroup + tbody tr:first-child td:last-child {
.border-top-right-radius(@border-radius-base); border-top-right-radius: @border-radius-base;
} }
} }