1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// 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;
}
|