Sha256: d2f4017a7807d80631f7c7a7b7d545b29cf9fa1ad88b597f07cfd73ee2dd9ac3

Contents?: true

Size: 1.82 KB

Versions: 29

Compression:

Stored size: 1.82 KB

Contents

// Foundation for Sites by ZURB
// foundation.zurb.com
// Licensed under MIT Open Source

////
/// @group responsive-embed
////

/// Margin below a responsive embed container.
/// @type Number
$responsive-embed-margin-bottom: rem-calc(16) !default;

/// Aspect ratios used to determine padding-bottom of responsive embed containers.
/// @type Map
$responsive-embed-ratios: (
  default: 4 by 3,
  widescreen: 16 by 9,
) !default;

// WARNING: Will be removed in version 6.4
$responsive-embed-ratio: default;

/// Creates a responsive embed container.
/// @param {String|List} $ratio [default] - Ratio of the container. Can be a key from the `$responsive-embed-ratios` map or a list formatted as `x by y`.
@mixin responsive-embed($ratio: default) {
  @if type-of($ratio) == 'string' {
    $ratio: map-get($responsive-embed-ratios, $ratio);
  }
  position: relative;
  height: 0;
  margin-bottom: $responsive-embed-margin-bottom;
  padding-bottom: ratio-to-percentage($ratio);
  overflow: hidden;

  iframe,
  object,
  embed,
  video {
    position: absolute;
    top: 0;
    #{$global-left}: 0;
    width: 100%;
    height: 100%;
  }
}

@mixin foundation-responsive-embed {
  .responsive-embed,
  .flex-video {
    @include responsive-embed($ratio: default);

    $ratios: map-remove($responsive-embed-ratios,default);

    @each $name, $ratio in $ratios {
      &.#{$name} {
        padding-bottom: ratio-to-percentage($ratio);
      }
    }
  }
}

@mixin foundation-flex-video {
  @warn 'This mixin is being replaced by foundation-responsive-embed(). foundation-flex-video() will be removed in Foundation 6.4.';
  @include foundation-responsive-embed;
}

@mixin flex-video($ratio: $responsive-embed-ratio) {
  @warn 'This mixin is being replaced by responsive-embed(). flex-video() will be removed in Foundation 6.4.';
  @include responsive-embed($ratio);
}

Version data entries

29 entries across 29 versions & 6 rubygems

Version Path
bedrock_sass-0.2.2 assets/_vendor/foundation/scss/components/_responsive-embed.scss
bedrock_sass-0.2.1 assets/_vendor/foundation/scss/components/_responsive-embed.scss
locomotivecms_wagon-2.4.1 generators/foundation/public/stylesheets/foundation6/components/_responsive-embed.scss
bedrock_sass-0.2.0 assets/_vendor/foundation/scss/components/_responsive-embed.scss
locomotivecms_wagon-2.4.0 generators/foundation/public/stylesheets/foundation6/components/_responsive-embed.scss
foundation-rails-6.4.3.0 vendor/assets/scss/components/_responsive-embed.scss
bedrock_sass-0.1.9 assets/_vendor/foundation/scss/components/_responsive-embed.scss
bedrock_sass-0.1.8 assets/_vendor/foundation/scss/components/_responsive-embed.scss
bedrock_sass-0.1.7 assets/_vendor/foundation/scss/components/_responsive-embed.scss
bedrock_sass-0.1.6 assets/_vendor/foundation/scss/components/_responsive-embed.scss
bedrock_sass-0.1.5 assets/_vendor/foundation/scss/components/_responsive-embed.scss
bedrock_sass-0.1.4 assets/_vendor/foundation/scss/components/_responsive-embed.scss
bedrock_sass-0.1.3 assets/_vendor/foundation/scss/components/_responsive-embed.scss
bedrock_sass-0.1.2 assets/_vendor/foundation/scss/components/_responsive-embed.scss
foundation-rails-6.4.1.3 vendor/assets/scss/components/_responsive-embed.scss
aacinfo-theme-2.0.1 _sass/foundation-sites/scss/components/_responsive-embed.scss
jekyll-theme-foundation-0.3.6 _sass/scss/components/_responsive-embed.scss
jekyll-theme-foundation-0.3.5 _sass/scss/components/_responsive-embed.scss
jekyll-theme-foundation-0.2.5 _sass/scss/components/_responsive-embed.scss
jekyll-theme-foundation-0.2.4 _sass/scss/components/_responsive-embed.scss