|
| 1 | +@mixin clearfix { |
| 2 | + &::after { |
| 3 | + content: ""; |
| 4 | + display: table; |
| 5 | + clear: both; |
| 6 | + } |
| 7 | +} |
| 8 | + |
| 9 | +@mixin divider($type, $color: $color-divider) { |
| 10 | + @if $type == "headline" { |
| 11 | + display: block; |
| 12 | + position: relative; |
| 13 | + margin: 0 auto 50px auto; |
| 14 | + text-align: center; |
| 15 | + padding: 0px 20px; |
| 16 | + |
| 17 | + &::before { |
| 18 | + border-bottom: 1px solid $color; |
| 19 | + content: ""; |
| 20 | + width: 47%; |
| 21 | + margin-left: -50%; |
| 22 | + top: 50%; |
| 23 | + height: 1px; |
| 24 | + position: absolute; |
| 25 | + } |
| 26 | + |
| 27 | + &::after { |
| 28 | + border-bottom: 1px solid $color; |
| 29 | + content: ""; |
| 30 | + width: 47%; |
| 31 | + margin-left: 3%; |
| 32 | + top: 50%; |
| 33 | + height: 1px; |
| 34 | + position: absolute; |
| 35 | + } |
| 36 | + } |
| 37 | + @else if $type == "single" { |
| 38 | + height: 1px; |
| 39 | + width: 100%; |
| 40 | + clear: both; |
| 41 | + background-color: $color-divider; |
| 42 | + } |
| 43 | +} |
| 44 | + |
| 45 | +@mixin placeholder($color) { |
| 46 | + &::-webkit-input-placeholder { |
| 47 | + color: $color; |
| 48 | + opacity: 1; |
| 49 | + } |
| 50 | + |
| 51 | + &:-moz-placeholder { |
| 52 | + color: $color; |
| 53 | + opacity: 1; |
| 54 | + } |
| 55 | + |
| 56 | + &::-moz-placeholder { |
| 57 | + color: $color; |
| 58 | + opacity: 1; |
| 59 | + } |
| 60 | + |
| 61 | + &:-ms-input-placeholder { |
| 62 | + color: $color; |
| 63 | + opacity: 1; |
| 64 | + } |
| 65 | +} |
| 66 | + |
| 67 | +@mixin media($width) { |
| 68 | + @media screen and (max-width: $width) { |
| 69 | + @content; |
| 70 | + } |
| 71 | +} |
| 72 | + |
| 73 | +@mixin animation($animate...) { |
| 74 | + $max: length($animate); |
| 75 | + $animations: ""; |
| 76 | + |
| 77 | + @for $i from 1 through $max { |
| 78 | + $animations: #{$animations + nth($animate, $i)}; |
| 79 | + |
| 80 | + @if $i < $max { |
| 81 | + $animations: #{$animations + ", "}; |
| 82 | + } |
| 83 | + } |
| 84 | + |
| 85 | + -webkit-animation: $animations; |
| 86 | + -moz-animation: $animations; |
| 87 | + -o-animation: $animations; |
| 88 | + animation: $animations; |
| 89 | +} |
| 90 | + |
| 91 | +@mixin keyframes($animationName) { |
| 92 | + @-webkit-keyframes #{$animationName} { |
| 93 | + @content; |
| 94 | + } |
| 95 | + |
| 96 | + @-moz-keyframes #{$animationName} { |
| 97 | + @content; |
| 98 | + } |
| 99 | + |
| 100 | + @-o-keyframes #{$animationName} { |
| 101 | + @content; |
| 102 | + } |
| 103 | + |
| 104 | + @keyframes #{$animationName} { |
| 105 | + @content; |
| 106 | + } |
| 107 | +} |
0 commit comments