_prefixer.scss 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //************************************************************************//
  2. // Example: @include prefixer(border-radius, $radii, webkit ms spec);
  3. //************************************************************************//
  4. // Variables located in /settings/_prefixer.scss
  5. @mixin prefixer ($property, $value, $prefixes) {
  6. @each $prefix in $prefixes {
  7. @if $prefix == webkit {
  8. @if $prefix-for-webkit {
  9. -webkit-#{$property}: $value;
  10. }
  11. }
  12. @else if $prefix == moz {
  13. @if $prefix-for-mozilla {
  14. -moz-#{$property}: $value;
  15. }
  16. }
  17. @else if $prefix == ms {
  18. @if $prefix-for-microsoft {
  19. -ms-#{$property}: $value;
  20. }
  21. }
  22. @else if $prefix == o {
  23. @if $prefix-for-opera {
  24. -o-#{$property}: $value;
  25. }
  26. }
  27. @else if $prefix == spec {
  28. @if $prefix-for-spec {
  29. #{$property}: $value;
  30. }
  31. }
  32. @else {
  33. @warn "Unrecognized prefix: #{$prefix}";
  34. }
  35. }
  36. }
  37. @mixin disable-prefix-for-all() {
  38. $prefix-for-webkit: false !global;
  39. $prefix-for-mozilla: false !global;
  40. $prefix-for-microsoft: false !global;
  41. $prefix-for-opera: false !global;
  42. $prefix-for-spec: false !global;
  43. }