Sha256: 941111e7e6b2c5694a7fa034efb60984d01291e94414d9b414122735a9040a1d

Contents?: true

Size: 861 Bytes

Versions: 8

Compression:

Stored size: 861 Bytes

Contents

// ---- Defaults --------------------------------------------------------------

$breakpoints: (mobile: 900px,
               large: 1400px) !default;


// ---- Mixins ----------------------------------------------------------------

@function breakpoint-value($value) {
  @if type-of($value) == "string" {
    @return map-get($breakpoints, $value);
  }
  @else {
    @return $value;
  }
}

@mixin breakpoint($min: "", $max: "", $orientation: "") {
  $query: "screen";

  @if $min != "" {
    $query: $query + ' and (min-width: #{breakpoint-value($min)})';
  }

  @if $max != "" {
    $query: $query + ' and (max-width: #{breakpoint-value($max)})';
  }

  @if $orientation != "" {
    $query: $query + ' and (orientation: #{$orientation})';
  }

  @media #{$query} {
    @content;
  }
}

@mixin mobile {
  @include breakpoint($max: mobile) {
    @content
  }
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pages_core-3.12.1 lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/breakpoints.scss
pages_core-3.12.0 lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/breakpoints.scss
pages_core-3.11.3 lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/breakpoints.scss
pages_core-3.11.2 lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/breakpoints.scss
pages_core-3.11.1 lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/breakpoints.scss
pages_core-3.11.0 lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/breakpoints.scss
pages_core-3.10.2 lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/breakpoints.scss
pages_core-3.10.1 lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/breakpoints.scss