Sha256: 081318b1443abbcf129b45dad340a51ddb02310551f0103af2a059b6188bd20a

Contents?: true

Size: 1.23 KB

Versions: 8

Compression:

Stored size: 1.23 KB

Contents

$grid-overlay-color: rgba(255, 0, 255, 0.05) !default;

@function grid-background($grid: default) {
  $gradient: ();
  @for $i from 1 to grid-value($grid, column-count) {
    $gradient: join($gradient,
                    ($grid-overlay-color columns($i, $grid: $grid),
                     transparent columns($i, $grid: $grid),
                     transparent columns-and-gutter($i, $grid: $grid),
                     $grid-overlay-color (columns-and-gutter($i, $grid: $grid))),
                    comma);
  }
  @return linear-gradient(to right, #{$gradient});
}

.grid-overlay {
  position: fixed;
  z-index: 9000;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  background-image: grid-background(default);
  background-size: px-to-percent(inner-width(default)) 100%;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  pointer-events: none;
  display: none;

  @if variable-exists(limit-width) {
    @include breakpoint($min: rem-calc($limit-width)) {
      background-size: rem-calc(limit-width-scale(inner-width())) 100%;
    }
  }

  @include mobile {
    background-image: grid-background(mobile);
    background-size: px-to-percent(inner-width(mobile), $grid: mobile) 100%;
  }

  &--active {
    display: block;
  }
}

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/grid_overlay.scss
pages_core-3.12.0 lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/grid_overlay.scss
pages_core-3.11.3 lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/grid_overlay.scss
pages_core-3.11.2 lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/grid_overlay.scss
pages_core-3.11.1 lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/grid_overlay.scss
pages_core-3.11.0 lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/grid_overlay.scss
pages_core-3.10.2 lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/grid_overlay.scss
pages_core-3.10.1 lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/grid_overlay.scss