Sha256: 67374221617635a07a9d78459f49fec8e01737562fea17e194c7998de8559fce
Contents?: true
Size: 1.45 KB
Versions: 4
Compression:
Stored size: 1.45 KB
Contents
@mixin sizing($args) { @if length($args) == 2 { width: nth($args, 1); height: nth($args, 2); } @else { width: $args; height: $args; } } @mixin quantity($args) { @warn "Quantity mixin will be depraceted"; @include sizing($args); } @mixin circle($args) { @include sizing($args); border-radius: 50%; } @mixin rounded-box($size, $corners) { @include sizing($size); @include inline-border-radius($corners); } @mixin inline-border-radius($args) { @if length($args) == 4 { border-top-left-radius: nth($args, 1); border-top-right-radius: nth($args, 2); border-bottom-right-radius: nth($args, 3); border-bottom-left-radius: nth($args, 4); } @else if length($args) == 2 { border-top-left-radius: nth($args, 1); border-top-right-radius: nth($args, 1); border-bottom-left-radius: nth($args, 2); border-bottom-right-radius: nth($args, 2); } @else if length($args) == 1 { border-radius: $args; } } @mixin _position($position, $args) { @each $dir in top, left, bottom, right { $i: index($args, $dir); @if $i { #{$dir}: nth($args, $i + 1); } } position: $position; } @mixin absolute($args) { @include _position(absolute, $args); } @mixin relative($args) { @include _position(relative, $args); } @mixin fixed($args) { @include _position(fixed, $args); } @mixin centered-vertically { @include transform(translateY(-50%)); position: relative; top: 50%; display: block; }
Version data entries
4 entries across 4 versions & 1 rubygems