Sha256: c0266fa683c0d296f032b74bd9f7e8f35cc40136d1b38f00390172ccacde43b0

Contents?: true

Size: 1.39 KB

Versions: 22

Compression:

Stored size: 1.39 KB

Contents

/// Creates a sliding transition by translating the element horizontally or vertically.
/// @param {Keyword} $state [in] - State to transition to.
/// @param {Keyword} $direction [left] - Direction to slide to. Can be `up`, `right`, `down`, or `left`.
/// @param {Length} $amount [100%] - Length of the slide as a percentage value.
/// @param {Boolean} $fade [false] - Set to `true` to fade the element in or out simultaneously.
/// @param {Duration} $duration [null] - Length (speed) of the transition.
/// @param {Keyword|Function} $timing [null] - Easing of the transition.
/// @param {Duration} $delay [null] - Delay in seconds or milliseconds before the transition starts.
@mixin mui-slide (
  $state: in,
  $direction: left,
  $amount: 100%,
  $fade: map-get($motion-ui-settings, slide-and-fade),
  $duration: null,
  $timing: null,
  $delay: null
) {
  $slide: slide($state, $direction, $amount);

  // CSS Output
  @include transition-start($state) {
    @include transition-basics($duration, $timing, $delay);
    @include -mui-keyframe-get($slide, 0);

    @if $fade {
      transition-property: transform, opacity;
      opacity: if($state == in, 0, 1);
    } @else {
      transition-property: transform, opacity;
    }

    backface-visibility: hidden;
  }

  @include transition-end($state) {
    @include -mui-keyframe-get($slide, 100);

    @if $fade {
      opacity: if($state == in, 1, 0);
    }
  }
}

Version data entries

22 entries across 22 versions & 4 rubygems

Version Path
locomotivecms_wagon-2.4.1 generators/foundation/public/stylesheets/foundation6/motion-ui/transitions/_slide.scss
locomotivecms_wagon-2.4.0 generators/foundation/public/stylesheets/foundation6/motion-ui/transitions/_slide.scss
foundation-rails-6.4.3.0 vendor/assets/scss/motion-ui/transitions/_slide.scss
bedrock_sass-0.1.9 assets/_vendor/motion-ui/transitions/_slide.scss
bedrock_sass-0.1.8 assets/_vendor/motion-ui/transitions/_slide.scss
bedrock_sass-0.1.7 assets/_vendor/motion-ui/transitions/_slide.scss
bedrock_sass-0.1.6 assets/_vendor/motion-ui/transitions/_slide.scss
bedrock_sass-0.1.5 assets/_vendor/motion-ui/transitions/_slide.scss
bedrock_sass-0.1.4 assets/_vendor/motion-ui/transitions/_slide.scss
bedrock_sass-0.1.3 assets/_vendor/motion-ui/transitions/_slide.scss
bedrock_sass-0.1.2 assets/_vendor/motion-ui/transitions/_slide.scss
foundation-rails-6.4.1.3 vendor/assets/scss/motion-ui/transitions/_slide.scss
aacinfo-theme-2.0.1 _sass/motion-ui/src/transitions/_slide.scss
foundation-rails-6.4.1.2 vendor/assets/scss/motion-ui/transitions/_slide.scss
foundation-rails-6.4.1.0 vendor/assets/scss/motion-ui/transitions/_slide.scss
foundation-rails-6.3.1.0 vendor/assets/scss/motion-ui/transitions/_slide.scss
foundation-rails-6.3.0.0 vendor/assets/scss/motion-ui/transitions/_slide.scss
foundation-rails-6.2.4.0 vendor/assets/scss/motion-ui/transitions/_slide.scss
foundation-rails-6.2.3.0 vendor/assets/scss/motion-ui/transitions/_slide.scss
foundation-rails-6.2.1.0 vendor/assets/scss/motion-ui/transitions/_slide.scss