Sha256: 20106da615e8a6a5cd242ce8cf01ce15e83917b8d8a8252953500f9160cd6820

Contents?: true

Size: 1.12 KB

Versions: 16

Compression:

Stored size: 1.12 KB

Contents

// Responsive media queries

@mixin breakpoint($breakpoint) {
  // Retrieves the value from the key
  $value: map-get($breakpoints, $breakpoint);

  // If the key exists in the map
  @if $value != null {
    // Prints a media query based on the value
    @media (min-width: $value) {
      @content;
    }
  }

  // If the key doesn't exist in the map
  @else {
    @warn "Unfortunately, no value could be retrieved from `#{$breakpoint}`. "
      + "Please make sure it is defined in `$breakpoints` map.";
  }
}

// Retina media query

@mixin retina-media-query {
  @media
    only screen and (-webkit-min-device-pixel-ratio: 2),
    only screen and (min--moz-device-pixel-ratio: 2),
    only screen and (-moz-min-device-pixel-ratio: 2),
    only screen and (-o-min-device-pixel-ratio: 2/1),
    only screen and (min-device-pixel-ratio: 2),
    only screen and (min-resolution: 192dpi),
    only screen and (min-resolution: 2dppx) {
    @content;
  }
}

// Clearfix
//
// Clears floats via mixin.

@mixin clearfix {
  &::before {
    display: table;
    content: "";
  }

  &::after {
    display: table;
    clear: both;
    content: "";
  }
}

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
jekyll-theme-primer-0.5.3 _sass/primer-support/lib/mixins/layout.scss
jekyll-theme-primer-0.5.2 _sass/primer-support/lib/mixins/layout.scss
jekyll-theme-primer-0.5.1 _sass/primer-support/lib/mixins/layout.scss
jekyll-theme-primer-0.5.0 _sass/primer-support/lib/mixins/layout.scss
jekyll-theme-primer-0.4.0 _sass/primer-support/lib/mixins/layout.scss
jekyll-theme-primer-0.3.1 _sass/primer-support/lib/mixins/layout.scss
jekyll-theme-primer-0.3.0 _sass/primer-support/lib/mixins/layout.scss
jekyll-theme-primer-0.2.1 _sass/primer-support/lib/mixins/layout.scss
jekyll-theme-primer-0.1.8 _sass/primer-support/lib/mixins/layout.scss
jekyll-theme-primer-0.1.7 _sass/primer-support/lib/mixins/layout.scss
jekyll-theme-primer-0.1.6 _sass/primer-support/lib/mixins/layout.scss
jekyll-theme-primer-0.1.5 _sass/primer-support/lib/mixins/layout.scss
jekyll-theme-primer-0.1.4 _sass/primer-support/lib/mixins/layout.scss
jekyll-theme-primer-0.1.3 _sass/primer-support/lib/mixins/layout.scss
jekyll-theme-primer-0.1.2 _sass/primer-support/lib/mixins/layout.scss
jekyll-theme-primer-0.1.1 _sass/primer-support/lib/mixins/layout.scss