dat.gui/elements/controller-boolean/controller-boolean.styl
George Michael Brower 6bf7a31cbc workflow and gulpfile
2014-09-02 20:00:52 -04:00

54 lines
956 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 );
}
&:hover #switch-knob {
transform: translate3d( width - height, 0, 0 ) scale( 1.5 );
}
}
.value-false:hover #switch-knob {
transform: scale( 1.5 );
}
#text {
margin-left: padding;
.value-true & {
// color: boolean-color;
}
.value-false & {
color: light;
}
}