|
|
|
@ -253,6 +253,53 @@
|
|
|
|
|
background: -o-linear-gradient($couleur1,$couleur2,$couleur3,$couleur4); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Triangle helper mixin |
|
|
|
|
// @param {Direction} $direction - Triangle direction, either `top`, `right`, `bottom` or `left` |
|
|
|
|
// @param {Color} $color [currentcolor] - Triangle color |
|
|
|
|
// @param {Length} $size [1em] - Triangle size |
|
|
|
|
// Example : |
|
|
|
|
// .foo { |
|
|
|
|
// position: relative; |
|
|
|
|
// &:before { |
|
|
|
|
// @include triangle(bottom, red, 0.25em); |
|
|
|
|
// position: absolute; |
|
|
|
|
// left: 100%; |
|
|
|
|
// top: 50%; |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
@mixin triangle($direction, $color: currentcolor, $size: 1em, $coefficient: 1.5) { |
|
|
|
|
@if not index(top right bottom left, $direction) { |
|
|
|
|
@error "Direction must be either `top`, `right`, `bottom` or `left`."; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
width: 0; |
|
|
|
|
height: 0; |
|
|
|
|
content: ''; |
|
|
|
|
z-index: 2; |
|
|
|
|
@if $direction == top { |
|
|
|
|
border-bottom: ($size * $coefficient) solid $color; |
|
|
|
|
} |
|
|
|
|
@if $direction == bottom { |
|
|
|
|
border-top: ($size * $coefficient) solid $color; |
|
|
|
|
} |
|
|
|
|
@if $direction == right { |
|
|
|
|
border-left: ($size * $coefficient) solid $color; |
|
|
|
|
} |
|
|
|
|
@if $direction == left { |
|
|
|
|
border-right: ($size * $coefficient) solid $color; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$perpendicular-borders: $size solid transparent; |
|
|
|
|
|
|
|
|
|
@if $direction == top or $direction == bottom { |
|
|
|
|
border-left: $perpendicular-borders; |
|
|
|
|
border-right: $perpendicular-borders; |
|
|
|
|
} @else if $direction == right or $direction == left { |
|
|
|
|
border-bottom: $perpendicular-borders; |
|
|
|
|
border-top: $perpendicular-borders; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// Font Face |
|
|
|
|
/// https://gist.github.com/jonathantneal/d0460e5c2d5d7f9bc5e6#file-_mixins-scss |
|
|
|
|