Sha256: 6d17e6f7d03517d32a60ca0d624d4ab1a72cdbf47d06014612b177637fe4d2c3

Contents?: true

Size: 845 Bytes

Versions: 94

Compression:

Stored size: 845 Bytes

Contents

$tablet: 640px;
$desktop: 1024px;

@mixin media-query($args...) {
  $media-type: 'only screen';
  $media-type-key: 'media-type';
  $args: keywords($args);
  $expr: '';

  @if map-has-key($args, $media-type-key) {
    $media-type: map-get($args, $media-type-key);
    $args: map-remove($args, $media-type-key);
  }

  @each $key, $value in $args {
    @if $value {
      $expr: "#{$expr} and (#{$key}: #{$value})";
    }
  }

  @media #{$media-type} #{$expr} {
    @content;
  }
}


@mixin mobile() {
  $max: $tablet - 1;
  @include media-query($max-width: $max) {
    @content;
  }
}

@mixin tablet() {
  $max: $desktop - 1;
  @include media-query($max-width: $max) {
    @content;
  }
}

@mixin tablet-only() {
  $min: $tablet;
  $max: $desktop - 1;

  @include media-query(
    $min-width: $min,
    $max-width: $max
  ) {
    @content;
  }
}

Version data entries

94 entries across 94 versions & 1 rubygems

Version Path
station-0.5.16 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss
station-0.5.15 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss
station-0.5.14 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss
station-0.5.13 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss
station-0.5.12 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss
station-0.5.11 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss
station-0.5.10 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss
station-0.5.9 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss
station-0.5.8 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss
station-0.5.7 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss
station-0.5.6 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss
station-0.5.5 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss
station-0.5.4 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss
station-0.5.3 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss
station-0.5.2 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss
station-0.5.1 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss
station-0.5.0 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss
station-0.4.9 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss
station-0.4.8 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss
station-0.4.7 lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss