stylesheets/toolkit/_intrinsic-ratio.scss in toolkit-0.2.5 vs stylesheets/toolkit/_intrinsic-ratio.scss in toolkit-0.2.6

- old
+ new

@@ -3,10 +3,11 @@ //////////////////////// $intrinsic-ratio: 16/9 !default; $intrinsic-ratio-width: 100% !default; $intrinsic-ratio-elements: '> *' !default; $intrinsic-ratio-extend: true !default; +$intrinsic-ratio-direction: top !default; @mixin intrinsic-ratio-parent { position: relative; height: 0; } @@ -19,17 +20,17 @@ top: 0; margin: 0; padding: 0; } -@mixin intrinsic-ratio($ratio: $intrinsic-ratio, $width: $intrinsic-ratio-width, $elements: $intrinsic-ratio-elements, $extend: $intrinsic-ratio-extend) { +@mixin intrinsic-ratio($ratio: $intrinsic-ratio, $width: $intrinsic-ratio-width, $elements: $intrinsic-ratio-elements, $extend: $intrinsic-ratio-extend, $direction: $intrinsic-ratio-direction) { @if not $extend { @include intrinsic-ratio-parent; } @else { @extend %intrinsic-ratio-parent; } - padding-top: (1 / $ratio) * $width; + padding-#{$direction}: (1 / $ratio) * $width; width: $width; @each $element in $elements { #{$element} { @if not $extend { @include intrinsic-ratio-child; \ No newline at end of file