New clearfix syntax and add mixin reference : https://github.com/locomotivemtl/locomotive-boilerplate/issues/23
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user