aboutsummaryrefslogtreecommitdiffstats
path: root/WebContent/VAADIN/themes/valo/components/_progressbar.scss
blob: 2c7e9925e7c522a90d0c5e88b994d32861c36d4f (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
$v-progressbar-border-radius: $v-border-radius !default;


@mixin valo-progressbar ($primary-stylename: v-progressbar) {

  .#{$primary-stylename}-wrapper {
    @include valo-progressbar-track-style;
    min-width: $v-unit-size * 2;
  }

  .#{$primary-stylename}-indicator {
    @include valo-progressbar-indicator-style;
    min-width: max($v-border-radius*2, 3px);
    @include transition(width 160ms );
  }


  .#{$primary-stylename}-point {
    .#{$primary-stylename}-indicator {
      background: transparent;
      box-shadow: none;
      border: none;
      text-align: right;
      overflow: hidden;

      &:before {
        content: "";
        display: inline-block;
        @include valo-progressbar-indicator-style;
        width: round($v-unit-size/4);
        vertical-align: top;
      }
    }
  }

}


@mixin valo-progressbar-track-style ($background-color: $v-background-color) {
  border-radius: $v-progressbar-border-radius;
  height: round($v-unit-size/4);
  $bg-lightness: if(color-luminance($background-color) < 10, min($v-bevel-depth/2, 10%), min($v-bevel-depth/-2, -10%));
  @include valo-gradient($color: scale-color($background-color, $lightness: $bg-lightness, $saturation: $v-bevel-depth/-2), $direction: to top);
  @include box-sizing(border-box);
}


@mixin valo-progressbar-indicator-style ($background-color: $v-selection-color, $border: $v-border) {
  border-radius: $v-progressbar-border-radius;
  height: inherit;
  @include valo-gradient($color: $background-color);
  box-shadow: valo-bevel-and-shadow($background-color: $background-color);
  @if $border {
    border: valo-border($border: $border, $color: $background-color, $context: $v-app-background-color);
  } @else {
    border: none;
  }
  @include box-sizing(border-box);
  max-width: 100%;
}