Sha256: 15022caa5f5305b19c1a511e65433f6b1d8fc1e0113d5786f0824a537762e532

Contents?: true

Size: 1011 Bytes

Versions: 5

Compression:

Stored size: 1011 Bytes

Contents

////////////////////////
// Fluid Images
////////////////////////
img {
  max-width: 100%;
  height: auto;
}

////////////////////////
// Scaling Embeds WITH NO JAVASCIPT!
//
// From the outrageously awesome Scott Kellum
////////////////////////
@mixin scale-elements($ratio: 16/9, $width: 100%, $elements: '*', $no-extend: false) {
  @if $no-extend {
    position: relative;
    height: 0;
  }
  @else {
    @extend %scaling-elements-parent;
  }
  padding-top: (1 / $ratio) * $width;
  width: $width;
  @each $element in $elements {
    > #{$element} {
      @if $no-extend {
        display: block;
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        margin: 0;
        padding: 0;
      }
      @else {
        @extend %scaling-elements-child;
      }
    }
  }
}

%scaling-elements-parent {
  position: relative;
  height: 0;
}

%scaling-elements-child {
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  margin: 0;
  padding: 0;
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
toolkit-0.1.18 stylesheets/toolkit/_fluid-media.scss
toolkit-0.1.17 stylesheets/toolkit/_fluid-media.scss
toolkit-0.1.16 stylesheets/toolkit/_fluid-media.scss
toolkit-0.1.15 stylesheets/toolkit/_fluid-media.scss
toolkit-0.1.14 stylesheets/toolkit/_fluid-media.scss