Sha256: 75f8da8d03ac5c2977c0cc97d4703d11c22fc4e993a1b13228a19ccb7f4ab964

Contents?: true

Size: 1.2 KB

Versions: 8

Compression:

Stored size: 1.2 KB

Contents

// Responsive media queries

@mixin breakpoint($breakpoint) {
  @if $breakpoint == '' {
    @content;
  }

  @else {
    // 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

8 entries across 8 versions & 1 rubygems

Version Path
jekyll-v4-theme-primer-0.16.0 _sass/@primer/css/support/mixins/layout.scss
jekyll-v4-theme-primer-0.15.0 _sass/@primer/css/support/mixins/layout.scss
jekyll-v4-theme-primer-0.14.0 _sass/@primer/css/support/mixins/layout.scss
jekyll-v4-theme-primer-0.13.0 _sass/@primer/css/support/mixins/layout.scss
jekyll-v4-theme-primer-0.12.0 _sass/@primer/css/support/mixins/layout.scss
jekyll-v4-theme-primer-0.11.0 _sass/@primer/css/support/mixins/layout.scss
jekyll-v4-theme-primer-0.10.0 _sass/@primer/css/support/mixins/layout.scss
jekyll-v4-theme-primer-0.9.0 _sass/@primer/css/support/mixins/layout.scss