mixins.scss 2.49 KB
Newer Older
1 2 3 4
/**
 * Generic mixins
 */
 @mixin box-shadow($shadow) {
Koen Punt's avatar
Koen Punt committed
5 6 7 8 9
  -webkit-box-shadow: $shadow;
  -moz-box-shadow: $shadow;
  -ms-box-shadow: $shadow;
  -o-box-shadow: $shadow;
  box-shadow: $shadow;
10 11
}

12 13
@mixin border-radius($radius) {
  -webkit-border-radius: $radius;
14 15 16
  -moz-border-radius: $radius;
  -ms-border-radius: $radius;
  -o-border-radius: $radius;
17 18 19
  border-radius: $radius;
}

Koen Punt's avatar
Koen Punt committed
20 21 22 23 24 25 26
@mixin linear-gradient($from, $to) {
  background-image: -webkit-gradient(linear, 0 0, 0 100%, from($from), to($to));
  background-image: -webkit-linear-gradient($from, $to);
  background-image: -moz-linear-gradient($from, $to);
  background-image: -o-linear-gradient($from, $to);
}

27 28 29 30 31 32 33 34
@mixin transition($transition) {
  -webkit-transition: $transition;
  -moz-transition: $transition;
  -ms-transition: $transition;
  -o-transition: $transition;
  transition: $transition;
}

35 36 37 38
/**
 * Prefilled mixins
 * Mixins with fixed values
 */
39
@mixin bg-light-gray-gradient {
40
  background: #f1f1f1;
41 42 43 44 45 46 47
  background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #f5f5f5), to(#e1e1e1));
  background-image: -webkit-linear-gradient(#f5f5f5 6.6%, #e1e1e1);
  background-image: -moz-linear-gradient(#f5f5f5 6.6%, #e1e1e1);
  background-image: -o-linear-gradient(#f5f5f5 6.6%, #e1e1e1);
}

@mixin bg-gray-gradient {
48
  background: #eee;
49 50 51 52 53 54 55
  background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #eee), to(#dfdfdf));
  background-image: -webkit-linear-gradient(#eee 6.6%, #dfdfdf);
  background-image: -moz-linear-gradient(#eee 6.6%, #dfdfdf);
  background-image: -o-linear-gradient(#eee 6.6%, #dfdfdf);
}

@mixin bg-dark-gray-gradient {
56
  background: #eee;
57 58 59 60
  background-image: -webkit-linear-gradient(#e9e9e9, #d7d7d7);
  background-image: -moz-linear-gradient(#e9e9e9, #d7d7d7);
  background-image: -o-linear-gradient(#e9e9e9, #d7d7d7);
}
61 62 63 64 65 66 67

@mixin shade {
  @include box-shadow(0 0 3px #ddd);
}

@mixin solid-shade {
  @include box-shadow(0 0 0 3px #f1f1f1);
68 69 70 71 72
}

@mixin header-font {
  color: $style_color;
  text-shadow: 0 1px 1px #FFF;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
73 74
  font-size: 18px;
  line-height: 42px;
75
  font-weight: normal;
76
  letter-spacing: -1px;
77
}
78 79 80 81 82 83 84 85 86 87 88

@mixin md-typography {
  code { padding: 0 4px; }
  p { font-size: 13px; }
  h1 { font-size: 26px; line-height: 40px; margin: 10px 0;}
  h2 { font-size: 22px; line-height: 40px; margin: 10px 0;}
  h3 { font-size: 18px; line-height: 40px; margin: 10px 0;}
  h4 { font-size: 16px; line-height: 20px; margin: 10px 0;}
  h5 { font-size: 14px; line-height: 20px; margin: 10px 0;}
  h6 { font-size: 12px; line-height: 20px; margin: 10px 0;}
}