Sha256: 1019f7194b35ad4e3ac3f3e64fda0d72db5b4b4d3d7f6fb4f293c47cd940f439

Contents?: true

Size: 789 Bytes

Versions: 31

Compression:

Stored size: 789 Bytes

Contents

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

////
/// @group functions
////

/// Returns the opposite direction of $dir
///
/// @param {Keyword} $dir - Used direction between "top", "right", "bottom" and "left".
/// @return {Keyword} Opposite direction of $dir
@function direction-opposite(
  $dir
) {
  $dirs: (top, right, bottom, left);
  $place: index($dirs, $dir);

  @if $place == null {
    @error 'direction-opposite: Invalid $dir parameter, expected a value from "#{$dirs}", found "#{$dir}".';
    @return null;
  }

  // Calcul the opposite place in a circle, with a starting index of 1
  $length: length($dirs);
  $demi: $length / 2;
  $opposite-place: (($place + $demi - 1) % $length) + 1;

  @return nth($dirs, $opposite-place);
}

Version data entries

31 entries across 31 versions & 7 rubygems

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