This commit is contained in:
Stephen Bégay
2015-05-26 21:58:02 -04:00
parent d2b785fab7
commit 9c390c0673
2 changed files with 21 additions and 18 deletions

View File

@@ -14,4 +14,18 @@
@function span($fraction) {
@return $fraction * 100%;
}
}
/* Mixins
========================================================================== */
// Micro clearfix, as per {@link css-101.org/articles/clearfix/latest-new-clearfix-so-far.php CSS Mojo}
//
// @see inuitcss/generic.clearfix
@mixin clearfix {
&:after {
content : "";
display : table;
clear : both;
}
}

View File

@@ -72,24 +72,13 @@
visibility: hidden;
}
/*
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
* `contenteditable` attribute is included anywhere else in the document.
* Otherwise it causes space to appear at the top and bottom of elements
* that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
* `:before` to contain the top-margins of child elements.
/**
* Contain Floats
*/
.clearfix:before,
.clearfix:after {
content: " "; /* 1 */
display: table; /* 2 */
%clearfix {
@include clearfix;
}
.clearfix:after {
clear: both;
.clearfix {
@extend %clearfix;
}