// Clearfix // -------- // For clearing floats like a boss h5bp.com/q @mixin clearfix { *zoom: 1; &::before, &::after { display: table; content: ""; // Fixes Opera/contenteditable bug: // http://nicolasgallagher.com/micro-clearfix-hack/#comment-36952 line-height: 0; } &::after { clear: both; } } @mixin size($height, $width) { width: $width; height: $height; } @mixin square($size) { @include size($size, $size); } // https://codepen.io/kennyglenn/pen/kxqWjP @function text-contrast($color, $dark, $light, $threshold: 51) { @return if(lightness($color) < $threshold, $light, $dark) } @mixin vertical-three-colors($startColor: #00b3ee, $midColor: #7a43b6, $colorStop: 50%, $endColor: #c3325f) { background-color: mix($midColor, $endColor, 80%); background-image: linear-gradient($startColor, $midColor $colorStop, $endColor); background-repeat: no-repeat; }