| 1 | $_levelbar_size: 5px; |
| 2 | $_levelbar_border_radius: 5px; |
| 3 | |
| 4 | levelbar { |
| 5 | &.horizontal { |
| 6 | trough > block { |
| 7 | min-height: $_levelbar_size; |
| 8 | border-radius: $_levelbar_border_radius; |
| 9 | |
| 10 | &:dir(rtl) { |
| 11 | border-radius: 0 $_levelbar_border_radius $_levelbar_border_radius 0; |
| 12 | } |
| 13 | |
| 14 | &:dir(ltr) { |
| 15 | border-radius: $_levelbar_border_radius 0 0 $_levelbar_border_radius; |
| 16 | } |
| 17 | |
| 18 | &.empty,&.full { |
| 19 | border-radius: $_levelbar_border_radius; |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | // segmented level bar |
| 24 | &.discrete { |
| 25 | trough > block { |
| 26 | min-height: 2px; |
| 27 | margin: 1px; |
| 28 | min-width: 24px; |
| 29 | border-radius:0; |
| 30 | &:first-child {border-radius: 2px 0 0 2px;} |
| 31 | &:last-child { |
| 32 | border-radius: 0 2px 2px 0; |
| 33 | } |
| 34 | } |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | &.vertical { |
| 39 | trough > block { |
| 40 | min-width: $_levelbar_size; |
| 41 | border-radius: $_levelbar_border_radius; |
| 42 | } |
| 43 | |
| 44 | &.discrete > trough > block { |
| 45 | min-width: $_levelbar_size - 3px; |
| 46 | margin: 1px 0; |
| 47 | min-height: 32px; |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | > trough { |
| 52 | padding: 0; |
| 53 | } |
| 54 | |
| 55 | // level bar colours |
| 56 | > trough > block { |
| 57 | border: 1px solid; |
| 58 | |
| 59 | &.low { |
| 60 | border-color: $warning_color; |
| 61 | background-color: $warning_color; |
| 62 | } |
| 63 | |
| 64 | &.high, |
| 65 | &:not(.empty) { |
| 66 | border-color: $dm_orange; |
| 67 | background-color: $dm_orange; |
| 68 | } |
| 69 | |
| 70 | &.full { |
| 71 | border-color: $success_color; |
| 72 | background-color: $success_color; |
| 73 | } |
| 74 | |
| 75 | &.empty { |
| 76 | background-color: lighten($base_color, 10%); |
| 77 | border-color: lighten($base_color, 10%); |
| 78 | } |
| 79 | } |
| 80 | } |