Sha256: dc1a87f24e837478294df5ebd3f3761ff49917408609cae5b6718ac9453f40c1

Contents?: true

Size: 1.63 KB

Versions: 169

Compression:

Stored size: 1.63 KB

Contents

@charset "UTF-8";

/// A mixin for generating vendor prefixes on non-standardized properties.
///
/// @param {String} $property
///   Property to prefix
///
/// @param {*} $value
///   Value to use
///
/// @param {List} $prefixes
///   Prefixes to define
///
/// @example scss - Usage
///   .element {
///     @include prefixer(border-radius, 10px, webkit ms spec);
///   }
///
/// @example css - CSS Output
///   .element {
///     -webkit-border-radius: 10px;
///     -moz-border-radius: 10px;
///     border-radius: 10px;
///   }
///
/// @require {variable} $prefix-for-webkit
/// @require {variable} $prefix-for-mozilla
/// @require {variable} $prefix-for-microsoft
/// @require {variable} $prefix-for-opera
/// @require {variable} $prefix-for-spec

@mixin prefixer($property, $value, $prefixes) {
  @each $prefix in $prefixes {
    @if $prefix == webkit {
      @if $prefix-for-webkit {
        -webkit-#{$property}: $value;
      }
    } @else if $prefix == moz {
      @if $prefix-for-mozilla {
        -moz-#{$property}: $value;
      }
    } @else if $prefix == ms {
      @if $prefix-for-microsoft {
        -ms-#{$property}: $value;
      }
    } @else if $prefix == o {
      @if $prefix-for-opera {
        -o-#{$property}: $value;
      }
    } @else if $prefix == spec {
      @if $prefix-for-spec {
        #{$property}: $value;
      }
    } @else  {
      @warn "Unrecognized prefix: #{$prefix}";
    }
  }
}

@mixin disable-prefix-for-all() {
  $prefix-for-webkit:    false !global;
  $prefix-for-mozilla:   false !global;
  $prefix-for-microsoft: false !global;
  $prefix-for-opera:     false !global;
  $prefix-for-spec:      false !global;
}

Version data entries

169 entries across 162 versions & 26 rubygems

Version Path
middleman-core-4.1.10 fixtures/minify-css-app/source/stylesheets/bourbon/addons/_prefixer.scss
garth-jekyll-theme-0.1.8 _sass/bourbon/addons/_prefixer.scss
middleman-core-4.1.9 fixtures/minify-css-app/source/stylesheets/bourbon/addons/_prefixer.scss
middleman-core-4.1.8 fixtures/minify-css-app/source/stylesheets/bourbon/addons/_prefixer.scss
active_admin_pro-0.2.4 app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_prefixer.scss
codelation_assets-0.4.0 app/assets/stylesheets/bourbon/addons/_prefixer.scss
active_admin_pro-0.2.3 app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_prefixer.scss
codelation_assets-0.3.9 app/assets/stylesheets/bourbon/addons/_prefixer.scss
bourbon-4.2.7 app/assets/stylesheets/addons/_prefixer.scss
active_admin_pro-0.2.2 app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_prefixer.scss
middleman-core-4.1.7 fixtures/minify-css-app/source/stylesheets/bourbon/addons/_prefixer.scss
codelation_assets-0.3.8 app/assets/stylesheets/bourbon/addons/_prefixer.scss
codelation_assets-0.3.7 app/assets/stylesheets/bourbon/addons/_prefixer.scss
middleman-core-4.1.6 fixtures/minify-css-app/source/stylesheets/bourbon/addons/_prefixer.scss
middleman-core-4.1.5 fixtures/minify-css-app/source/stylesheets/bourbon/addons/_prefixer.scss
middleman-core-4.1.3 fixtures/minify-css-app/source/stylesheets/bourbon/addons/_prefixer.scss
codelation_assets-0.3.6 app/assets/stylesheets/bourbon/addons/_prefixer.scss
active_admin_pro-0.2.1 app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_prefixer.scss
active_admin_pro-0.2.0 app/assets/stylesheets/active_admin_pro/vendor/bourbon/addons/_prefixer.scss
codelation_assets-0.3.5 app/assets/stylesheets/bourbon/addons/_prefixer.scss