~tempo-openerp/+junk/osclass-axima-dev

« back to all changes in this revision

Viewing changes to oc-includes/osclass/gui/sass/bourbon/addons/_prefixer.scss

  • Committer: vg at tempo-consulting
  • Date: 2013-08-20 07:59:29 UTC
  • Revision ID: vg@tempo-consulting.fr-20130820075929-m57t59qytwvctmuu
osclass axima site annonces

Show diffs side-by-side

added added

removed removed

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