dat.gui/elements/controller-boolean/controller-boolean.styl
2014-09-02 13:13:35 -04:00

48 lines
787 B
Stylus

@import '../shared';
height = 8px;
width = round( height * 2.5 );
border-radius = height;
#container {
height: 100%;
cursor: pointer;
padding-left: padding
}
#switch-track {
width: width;
height: height;
background: light;
border-radius: border-radius;
transition: background 0.1s linear;
}
#switch-knob {
height: height;
width: height;
border-radius: border-radius;
background: white;
transition: transform 0.15s ease;
}
.value-true {
#switch-track {
background: boolean-color;
}
#switch-knob {
transform: translate3d( width - height, 0, 0 );
}
}
#text {
margin-left: padding;
.value-true & {
// color: boolean-color;
}
.value-false & {
color: light;
}
}