new widget : meter (standalone and as a fader option

This commit is contained in:
jean-emmanuel 2016-03-18 18:11:20 +01:00
parent 1eba6b683a
commit 3a5c0d875f
7 changed files with 157 additions and 9 deletions

View file

@ -44,11 +44,6 @@
display:block;
box-shadow: 0 0 0 15rem $color-fg;
}
&.nogauge {
.handle {
background:none;
}
}
.handle {
position: absolute;
bottom:0!important;
@ -59,7 +54,7 @@
max-height:100%;
max-width:100%;
background:$color-accent;
z-index: 1;
z-index: 3;
transform-style: preserve-3d;
backface-visibility: hidden;
span {
@ -95,6 +90,25 @@
box-shadow: 0 0 0 1rem transparentize($color-accent,.8) inset;
}
}
.meter-container {
position: absolute;
z-index: 2;
left:-12rem;
right:-12rem;
bottom:0;
top:0;
min-width: 0;
min-height: 0;
box-shadow: none;
-webkit-mask:linear-gradient(to right,#000 2rem, rgba(0,0,0,0) 2rem, rgba(0,0,0,0) 26rem, #000 26rem);
opacity:0.5;
.meter {
left:0;
right:0;
top:0;
bottom:0;
}
}
}
.pips {

View file

@ -49,3 +49,34 @@
}
}
}
.meter-container {
&.nolabel .meter {
top:1rem;
}
.meter {
position: absolute;
top:35rem;
left:1rem;
right:1rem;
bottom:1rem;
background: $color-bg;
.level {
position: absolute;
bottom:0!important;
top:auto!important;
width:100%;
height:100%;
transform-origin: bottom;
max-height:100%;
max-width:100%;
background:$color-accent;
&.horizontal {
transform-origin: left;
}
}
}
}