Sha256: 73d9bb77eac682dddfc872158622b6d8f7244fc2e9cbc6c7b524d857868a6823

Contents?: true

Size: 1.58 KB

Versions: 1

Compression:

Stored size: 1.58 KB

Contents

//############################################//
//######## Responsive Utilities #############//
//###########################################//

$breakpoints: (
    s: $small, // Mobile Screens
    m: $medium, // Tablet Screens
    l: $large, // Normal Screens
    w: $wide // Wide Screens
);

$min-width: min-width;

//############################################//
//# Customize Alom editing the variables  ###//
//###########################################//
// Example: @include breakpoint(s);
@mixin breakpoint($bp) {
  @media screen and (max-width: #{map-get($breakpoints, $bp)}) {
    @content;
  }
}


//############################################//
//####### Hide elements on devices  #########//
//###########################################//
@each $bp in map-keys($breakpoints) {
  .hide-on-#{$bp} {
    @include breakpoint($bp) {
      display: none !important;
    }
  }
}

//############################################//
//### Hide elements in only this devices  ###//
//###########################################//
@each $bp in map-keys($breakpoints) {
  .hide-on-#{$bp}-only {
    @media screen and (min-width: prev($breakpoints, #{$bp})) and (max-width: next($breakpoints, #{$bp})) {
      display: none !important;
    }
  }
}

@each $bp in map-keys($breakpoints) {
  .show-on-#{$bp} {
    display: none;

    @if ($min-width != null) {
      @media screen and (max-width: $small) {
        display: block;
      }
    }

    @else {
      @media screen and ($min-width: prev($breakpoints, #{$bp})) and (max-width: next($breakpoints, #{$bp})) {
        display: block;
      }
    }
  }
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
alom-1.0.0 vendor/assets/stylesheets/alom/_responsive.scss