aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNinir <[email protected]>2012-10-30 10:22:09 +0100
committerMark Otto <[email protected]>2012-10-31 11:09:44 -0700
commitbe03a5308663052be22d48cbe247b2c259fdefe9 (patch)
tree94993c2adb2ff7cbd57ea9e8def0d3fcbdf4ebb4
parent14b941744c5ef3cc67c41e3bae7284fafe052415 (diff)
downloadbootstrap-be03a5308663052be22d48cbe247b2c259fdefe9.tar.xz
bootstrap-be03a5308663052be22d48cbe247b2c259fdefe9.zip
Replaced hardcoded CSS rules with mixins
-rw-r--r--less/button-groups.less32
-rw-r--r--less/dropdowns.less12
-rw-r--r--less/reset.less4
-rw-r--r--less/tables.less25
4 files changed, 18 insertions, 55 deletions
diff --git a/less/button-groups.less b/less/button-groups.less
index 46837e628..ca8a770d4 100644
--- a/less/button-groups.less
+++ b/less/button-groups.less
@@ -58,41 +58,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
.btn-group > .btn:first-child {
margin-left: 0;
- -webkit-border-top-left-radius: 4px;
- -moz-border-radius-topleft: 4px;
- border-top-left-radius: 4px;
- -webkit-border-bottom-left-radius: 4px;
- -moz-border-radius-bottomleft: 4px;
- border-bottom-left-radius: 4px;
+ .border-top-left-radius(4px);
+ .border-bottom-left-radius(4px);
}
// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
.btn-group > .btn:last-child,
.btn-group > .dropdown-toggle {
- -webkit-border-top-right-radius: 4px;
- -moz-border-radius-topright: 4px;
- border-top-right-radius: 4px;
- -webkit-border-bottom-right-radius: 4px;
- -moz-border-radius-bottomright: 4px;
- border-bottom-right-radius: 4px;
+ .border-top-right-radius(4px);
+ .border-bottom-right-radius(4px);
}
// Reset corners for large buttons
.btn-group > .btn.large:first-child {
margin-left: 0;
- -webkit-border-top-left-radius: 6px;
- -moz-border-radius-topleft: 6px;
- border-top-left-radius: 6px;
- -webkit-border-bottom-left-radius: 6px;
- -moz-border-radius-bottomleft: 6px;
- border-bottom-left-radius: 6px;
+ .border-top-left-radius(6px);
+ .border-bottom-left-radius(6px);
}
.btn-group > .btn.large:last-child,
.btn-group > .large.dropdown-toggle {
- -webkit-border-top-right-radius: 6px;
- -moz-border-radius-topright: 6px;
- border-top-right-radius: 6px;
- -webkit-border-bottom-right-radius: 6px;
- -moz-border-radius-bottomright: 6px;
- border-bottom-right-radius: 6px;
+ .border-top-right-radius(6px);
+ .border-bottom-right-radius(6px);
}
// On hover/focus/active, bring the proper btn to front
diff --git a/less/dropdowns.less b/less/dropdowns.less
index 26ca0f9ea..730ff6e19 100644
--- a/less/dropdowns.less
+++ b/less/dropdowns.less
@@ -168,9 +168,7 @@
left: 100%;
margin-top: -6px;
margin-left: -1px;
- -webkit-border-radius: 0 6px 6px 6px;
- -moz-border-radius: 0 6px 6px 6px;
- border-radius: 0 6px 6px 6px;
+ .border-radius(0 6px 6px 6px);
}
.dropdown-submenu:hover > .dropdown-menu {
display: block;
@@ -182,9 +180,7 @@
bottom: 0;
margin-top: 0;
margin-bottom: -2px;
- -webkit-border-radius: 5px 5px 5px 0;
- -moz-border-radius: 5px 5px 5px 0;
- border-radius: 5px 5px 5px 0;
+ .border-radius(5px 5px 5px 0);
}
// Caret to indicate there is a submenu
@@ -215,9 +211,7 @@
> .dropdown-menu {
left: -100%;
margin-left: 10px;
- -webkit-border-radius: 6px 0 6px 6px;
- -moz-border-radius: 6px 0 6px 6px;
- border-radius: 6px 0 6px 6px;
+ .border-radius(6px 0 6px 6px);
}
}
diff --git a/less/reset.less b/less/reset.less
index 2abdee462..e2c7cab00 100644
--- a/less/reset.less
+++ b/less/reset.less
@@ -123,9 +123,7 @@ input[type="submit"] {
cursor: pointer; // Improves usability and consistency of cursor style between image-type `input` and others.
}
input[type="search"] { // Appearance in Safari/Chrome
- -webkit-box-sizing: content-box;
- -moz-box-sizing: content-box;
- box-sizing: content-box;
+ .box-sizing(content-box);
-webkit-appearance: textfield;
}
input[type="search"]::-webkit-search-decoration,
diff --git a/less/tables.less b/less/tables.less
index 3f2c7f783..fc8750f97 100644
--- a/less/tables.less
+++ b/less/tables.less
@@ -91,31 +91,22 @@ table {
// For first th or td in the first row in the first thead or tbody
thead:first-child tr:first-child th:first-child,
tbody:first-child tr:first-child td:first-child {
- -webkit-border-top-left-radius: 4px;
- border-top-left-radius: 4px;
- -moz-border-radius-topleft: 4px;
+ .border-top-left-radius(4px);
}
thead:first-child tr:first-child th:last-child,
tbody:first-child tr:first-child td:last-child {
- -webkit-border-top-right-radius: 4px;
- border-top-right-radius: 4px;
- -moz-border-radius-topright: 4px;
+ .border-top-right-radius(4px);
}
// For first th or td in the first row in the first thead or tbody
thead:last-child tr:last-child th:first-child,
tbody:last-child tr:last-child td:first-child,
tfoot:last-child tr:last-child td:first-child {
- .border-radius(0 0 0 4px);
- -webkit-border-bottom-left-radius: 4px;
- border-bottom-left-radius: 4px;
- -moz-border-radius-bottomleft: 4px;
+ .border-bottom-left-radius(4px);
}
thead:last-child tr:last-child th:last-child,
tbody:last-child tr:last-child td:last-child,
tfoot:last-child tr:last-child td:last-child {
- -webkit-border-bottom-right-radius: 4px;
- border-bottom-right-radius: 4px;
- -moz-border-radius-bottomright: 4px;
+ .border-bottom-right-radius(4px);
}
// Special fixes to round the left border on the first td/th
@@ -123,17 +114,13 @@ table {
caption + tbody tr:first-child td:first-child,
colgroup + thead tr:first-child th:first-child,
colgroup + tbody tr:first-child td:first-child {
- -webkit-border-top-left-radius: 4px;
- border-top-left-radius: 4px;
- -moz-border-radius-topleft: 4px;
+ .border-top-left-radius(4px);
}
caption + thead tr:first-child th:last-child,
caption + tbody tr:first-child td:last-child,
colgroup + thead tr:first-child th:last-child,
colgroup + tbody tr:first-child td:last-child {
- -webkit-border-top-right-radius: 4px;
- border-top-right-radius: 4px;
- -moz-border-radius-topright: 4px;
+ .border-top-right-radius(4px);
}
}