aboutsummaryrefslogtreecommitdiff
path: root/less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-12-08 23:18:28 -0800
committerMark Otto <[email protected]>2013-12-08 23:18:28 -0800
commit0016c17f9307bc71fc96d8d4680a9c861f137cae (patch)
tree924b71e67407df3203ed726480c06063c52be9d6 /less
parent2a4621b71f3440fac06f519fe9a0e61d4418dbe6 (diff)
downloadbootstrap-0016c17f9307bc71fc96d8d4680a9c861f137cae.tar.xz
bootstrap-0016c17f9307bc71fc96d8d4680a9c861f137cae.zip
Switch to `&:extend(.clearfix all)` for clearfix mixin
Original discussion: https://github.com/less/less.js/issues/1437#issuecomment-21383639. Since we’re switching to `grunt-contrib-less`, we can take advantage of newer LESS features than what RECESS supported. Included in that is the ability to `:extend`, and not only that, but `:extend(.mixin-name all)`. By doing so, we remove duplicate CSS for all our elements that were being clearfix-ed. Fixes #8947, #8968, #8991, #9257, #9268, #9291, #9430, #9604, #9686, #9929, #10731, #10793, #11305, #11498, #11533, #11570, #11604, #11652. (dem issues, tho)
Diffstat (limited to 'less')
-rw-r--r--less/button-groups.less4
-rw-r--r--less/mixins.less4
-rw-r--r--less/modals.less2
-rw-r--r--less/navbar.less6
-rw-r--r--less/navs.less2
-rw-r--r--less/pager.less2
-rw-r--r--less/panels.less2
-rw-r--r--less/type.less2
8 files changed, 12 insertions, 12 deletions
diff --git a/less/button-groups.less b/less/button-groups.less
index 05fda149a..ef9c34e77 100644
--- a/less/button-groups.less
+++ b/less/button-groups.less
@@ -37,7 +37,7 @@
// Optional: Group multiple button groups together for a toolbar
.btn-toolbar {
- .clearfix();
+ &:extend(.clearfix all);
.btn-group {
float: left;
@@ -157,7 +157,7 @@
// Clear floats so dropdown menus can be properly placed
> .btn-group {
- .clearfix();
+ &:extend(.clearfix all);
> .btn {
float: none;
}
diff --git a/less/mixins.less b/less/mixins.less
index 9ef72fef7..1079b947a 100644
--- a/less/mixins.less
+++ b/less/mixins.less
@@ -597,14 +597,14 @@
margin-left: auto;
padding-left: (@grid-gutter-width / 2);
padding-right: (@grid-gutter-width / 2);
- .clearfix();
+ &:extend(.clearfix all);
}
// Creates a wrapper for a series of columns
.make-row(@gutter: @grid-gutter-width) {
margin-left: (@gutter / -2);
margin-right: (@gutter / -2);
- .clearfix();
+ &:extend(.clearfix all);
}
// Generate the extra small columns
diff --git a/less/modals.less b/less/modals.less
index e65dbf7f1..292b5bd9c 100644
--- a/less/modals.less
+++ b/less/modals.less
@@ -98,7 +98,7 @@
padding: (@modal-inner-padding - 1) @modal-inner-padding @modal-inner-padding;
text-align: right; // right align buttons
border-top: 1px solid @modal-footer-border-color;
- .clearfix(); // clear it in case folks use .pull-* classes on buttons
+ &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons
// Properly space out buttons
.btn + .btn {
diff --git a/less/navbar.less b/less/navbar.less
index e9633d855..51e3df258 100644
--- a/less/navbar.less
+++ b/less/navbar.less
@@ -15,7 +15,7 @@
border: 1px solid transparent;
// Prevent floats from breaking the navbar
- .clearfix();
+ &:extend(.clearfix all);
@media (min-width: @grid-float-breakpoint) {
border-radius: @navbar-border-radius;
@@ -29,7 +29,7 @@
// styling of responsive aspects.
.navbar-header {
- .clearfix();
+ &:extend(.clearfix all);
@media (min-width: @grid-float-breakpoint) {
float: left;
@@ -54,7 +54,7 @@
padding-left: @navbar-padding-horizontal;
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
- .clearfix();
+ &:extend(.clearfix all);
-webkit-overflow-scrolling: touch;
&.in {
diff --git a/less/navs.less b/less/navs.less
index 859d5d866..e4ac14459 100644
--- a/less/navs.less
+++ b/less/navs.less
@@ -10,7 +10,7 @@
margin-bottom: 0;
padding-left: 0; // Override default ul/ol
list-style: none;
- .clearfix();
+ &:extend(.clearfix all);
> li {
position: relative;
diff --git a/less/pager.less b/less/pager.less
index 16993ddc8..5205f0ee5 100644
--- a/less/pager.less
+++ b/less/pager.less
@@ -8,7 +8,7 @@
margin: @line-height-computed 0;
list-style: none;
text-align: center;
- .clearfix();
+ &:extend(.clearfix all);
li {
display: inline;
> a,
diff --git a/less/panels.less b/less/panels.less
index a5ada2a2d..37ab67043 100644
--- a/less/panels.less
+++ b/less/panels.less
@@ -15,7 +15,7 @@
// Panel contents
.panel-body {
padding: 15px;
- .clearfix();
+ &:extend(.clearfix all);
}
diff --git a/less/type.less b/less/type.less
index 0c9600d50..1eddb3f9b 100644
--- a/less/type.less
+++ b/less/type.less
@@ -202,7 +202,7 @@ dd {
}
dd {
margin-left: @component-offset-horizontal;
- .clearfix(); // Clear the floated `dt` if an empty `dd` is present
+ &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present
}
}
}