Skip to content

Commit

Permalink
Update clearfix mixin (#21224)
Browse files Browse the repository at this point in the history
* Update clearfix to use block instead of table display (also reorder properties for linting)
* update docs snippet for clearfix mixin—was apparently still using Less syntax and had old clearfix hack (even before the block change in this PR)
  • Loading branch information
mdo authored Nov 28, 2016
1 parent 585516d commit 869bd23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions docs/utilities/clearfix.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ Easily clear `float`s by adding `.clearfix` **to the parent element**. Utilizes

{% highlight scss %}
// Mixin itself
.clearfix() {
&:before,
&:after {
content: " ";
display: table;
}
&:after {
@mixin clearfix() {
&::after {
display: block;
content: "";
clear: both;
}
}
Expand Down
2 changes: 1 addition & 1 deletion scss/mixins/_clearfix.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@mixin clearfix() {
&::after {
display: block;
content: "";
display: table;
clear: both;
}
}

0 comments on commit 869bd23

Please sign in to comment.