Sha256: 1fbadc46c5573528241ed3b5f13721a51f467b89dfaf53f923c6316bdf1c5af3

Contents?: true

Size: 1.02 KB

Versions: 1

Compression:

Stored size: 1.02 KB

Contents

@import "settings";

@function set-breakpoint(
  $min            : false,
  $max            : false,
  $custom         : false,
  $legacy-support : false
  ) {

  @if (not $min) and (not $max) and (not $custom) {
    @warn "Either $min, $max, or $custom must be defined for set-breakpoint to work.";
  }

  @if $min and $max {
    // Both $min and $max
    @return "(min-width: #{ $min }) and (max-width: #{ $max })", $legacy-support;
  } @else {
    @if $min and (not $max) {
      // Min only:
      @return "(min-width: #{ $min })", $legacy-support;
    }
    @if $max and (not $min) {
      // Max only:
      @return "(max-width: #{ $max })", $legacy-support;
    } @else {
      // Custom:
      @return $custom, $legacy-support;
    }
  }
}

@mixin at-breakpoint( 
  $breakpoint,
  $legacy-support: false
  ) {
  @media #{ nth( $breakpoint, 1 ) } {
    @content;
  }
  @if $legacy-support or nth( $breakpoint, 2 ) {
    #{ $legacy-selector } & {
      /* Fallback for browsers not supporting media queries */
      @content;
    }
  }
}


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ezy-0.2.6.alpha sass/ezy/_media.scss