icon edge
checkbox icon, border transition
<input class="btn--play" type="checkbox"/>
<input class="btn--play" type="checkbox"/>
$w:50px;
$w:50px;
$h:$w*1.2;
$color-icon:#eee;
$speed:300ms;
$ease: cubic-bezier(0.680, -0.550, 0.265, 1.650);
*{
margin:0;
padding:0;
}
html,
body{
height:100%;
}
body{
background:#1AAF5D;
}
.btn--play{
cursor:pointer;
position: absolute;
width: $w;
height: $h;
top: 50%;
left:50%;
margin-top:-($h/2);
margin-left:-($w/2);
appearance(none);
outline:0;
border-style: solid;
border-width: ($h/2) 0 ($h/2) $w;
border-color: transparent transparent transparent $color-icon;
transform-origin(50% 50%);
backface-visibility(hidden);
transition(all $speed ease);
-moz-transform: scale(1.00005); /* hack Firefox smooth edge */
&:hover{
transform(scale(1.05));
}
&:checked{
border-width: 0 ($h/3.5) 0 ($h/3.5);
border-color: transparent $color-icon transparent $color-icon;
transition(all $speed $ease);
}
}
/*
/*
autor: Marco Barría
https://twitter.com/marco_bf
*/