summaryrefslogtreecommitdiffstats
path: root/WebContent/VAADIN/themes/valo/util/_css3.scss
blob: dc2dc781a7e78479887420bbafea85a96617dfc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
 * Cross-browser opacity.
 *
 * @param {number} $value - opacity value from 0 to 1
 * @param {bool} $important (false) - should the property value be declared with !important
 *
 * @group util
 */
@mixin opacity ($value, $important: false) {
  $importantValue: null;
  @if $important {
    $importantValue: unquote("!important");
  }

  opacity: $value $importantValue;

  @if $value < 1 {
    $valueperc: $value*100;
    filter: alpha(opacity=#{$valueperc}) #{$importantValue};
  } @else {
    filter: none #{$importantValue};
  }
}

/**
 * Cross-browser box-shadow.
 * -webkit-box-shadow is still needed for Android 2.3 and 3.0, as well as iOS 5
 *
 * @param {list} $shadows - Any valid CSS box-shadow value
 *
 * @group util
 */
@mixin box-shadow ($shadows...) {
  @include prefixer(box-shadow, $shadows, webkit spec);
}