2014-03-10 07:18:48 +01:00
|
|
|
// Clearfix
|
|
|
|
//
|
|
|
|
// 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 are clearfixed.
|
|
|
|
// 2. The use of `table` rather than `block` is only necessary if using
|
2018-09-21 21:07:32 +02:00
|
|
|
// `:before` to contain the top-margins of child elements.
|
2014-03-10 08:05:57 +01:00
|
|
|
//
|
|
|
|
// Source: http://nicolasgallagher.com/micro-clearfix-hack/
|
2014-03-10 07:18:48 +01:00
|
|
|
|
|
|
|
.clearfix() {
|
2018-09-21 21:07:32 +02:00
|
|
|
&:before,
|
|
|
|
&:after {
|
2014-03-10 07:18:48 +01:00
|
|
|
display: table; // 2
|
2017-11-26 03:06:34 +01:00
|
|
|
content: " "; // 1
|
2014-03-10 07:18:48 +01:00
|
|
|
}
|
2018-09-21 21:07:32 +02:00
|
|
|
&:after {
|
2014-03-10 07:18:48 +01:00
|
|
|
clear: both;
|
|
|
|
}
|
|
|
|
}
|