Sha256: 2ff8dfc87b2d760a202b1fde6ee2cd75795cbdff03403c59c9f573b102271bd5

Contents?: true

Size: 1.84 KB

Versions: 12

Compression:

Stored size: 1.84 KB

Contents

// Browser Support
// ===============

// Susy Support Defaults
// ---------------------
@include susy-defaults((
  use-custom: (
    clearfix: false,
    background-image: true,
    background-options: false,
    breakpoint: true,
    box-sizing: true,
    rem: true,
  ),
));


// Susy Support [mixin]
// --------------------
// Send property-value pairs to the proper support modules.
// - $prop  : <css property>
// - $val   : <css value>
@mixin susy-support(
  $prop,
  $val
) {
  // Background Support
  @if $prop == background-image {
    @include susy-background-image($val);
  } @else if $prop == background-size {
    @include susy-background-size($val);
  } @else if $prop == background-origin {
    @include susy-background-origin($val);
  } @else if $prop == background-clip {
    @include susy-background-clip($val);
  }

  // Box-Sizing Support
  @else if $prop == box-sizing {
    @include susy-box-sizing($val);
  }

  // Rem Support
  @else {
    @include susy-rem($prop, $val);
  }
}


// Susy Support [function]
// -----------------------
// Check for support of a feature.
// - $feature       : <string>
//                    - e.g "rem" or "box-sizing"
// - $requirements  : <map>
//                    - e.g (variable: rem-with-px-fallback, mixin: rem)
// - $warn          : <bool>
@function susy-support(
  $feature,
  $requirements: (),
  $warn: true
) {
  $_support: susy-get(use-custom $feature);

  @if $_support {
    $_fail: false;

    @each $_type, $_req in $requirements {
      @each $_i in $_req {
        $_pass: call(unquote("#{$_type}-exists"), $_i);

        @if not($_pass) {
          $_fail: true;
          @if $warn {
            @warn "You requested custom support of #{$feature}, but the #{$_i} #{$_type} is not available.";
          }
        }
      }
    }

    $_support: if($_fail, false, $_support);
  }

  @return $_support;
}

Version data entries

12 entries across 12 versions & 5 rubygems

Version Path
sparrow-jekyll-theme-0.1.2 _sass/vendor/susy/susy/output/support/_support.scss
minimal-mistakes-jekyll-4.4.1 _sass/minimal-mistakes/vendor/susy/susy/output/support/_support.scss
jekyll-theme-basically-basic-1.0.0 _sass/basically-basic/vendor/susy/output/support/_support.scss
jekyll-theme-woforo-0.2.3 _sass/vendor/susy/susy/output/support/_support.scss
jekyll-theme-woforo-0.2.2 _sass/vendor/susy/susy/output/support/_support.scss
jekyll-theme-woforo-0.2.1 _sass/vendor/susy/susy/output/support/_support.scss
jekyll-theme-woforo-0.2.0 _sass/vendor/susy/susy/output/support/_support.scss
minimal-mistakes-jekyll-4.1.1 _sass/vendor/susy/susy/output/support/_support.scss
minimal-mistakes-jekyll-4.0.1 _sass/vendor/susy/susy/output/support/_support.scss
susy-2.2.12 sass/susy/output/support/_support.scss
susy-2.2.11 sass/susy/output/support/_support.scss
susy-2.2.10 sass/susy/output/support/_support.scss