Sha256: e2cd4b730b94582fbc846b29dc37d7b4bcb43bce1e2a2aeadf69e52a1af2b648
Contents?: true
Size: 1016 Bytes
Versions: 12
Compression:
Stored size: 1016 Bytes
Contents
// Only handles right direction for now... .base-shape { display: block; content: ''; } @mixin triangle($direction: down, $size: 30px, $color: black) { @extend .base-shape; width: 0; height: 0; @if $direction == down { border-left: $size/2 solid transparent; border-right: $size/2 solid transparent; border-top: $size solid $color; border-bottom: 0; } @else if $direction == right { border-top: $size/2 solid transparent; border-bottom: $size/2 solid transparent; border-left: $size solid $color; border-right: 0; } @else if $direction == left { border-top: $size/2 solid transparent; border-bottom: $size/2 solid transparent; border-right: $size solid $color; border-left: 0; } @else if $direction == up { border-left: $size/2 solid transparent; border-right: $size/2 solid transparent; border-bottom: $size solid $color; border-top: 0; } }
Version data entries
12 entries across 12 versions & 3 rubygems