Skip to content

Instantly share code, notes, and snippets.

@ruzz311
Created February 25, 2014 23:53
Show Gist options
  • Save ruzz311/9220528 to your computer and use it in GitHub Desktop.
Save ruzz311/9220528 to your computer and use it in GitHub Desktop.
ShadowDOM Music Note
<input class="notePicker" type="range" name="points" min="1" max="7" value="1" />
$h = 200px;
$w = 300px;
$bgsize = 53px;
.notePicker {
transform-origin: 60% 75%;
transform: rotate(-90deg);
width: $w;
height: $h;
&::-webkit-slider-thumb {
box-shadow: inset 0 0 10px 10px #000;
border-radius: 50%;
margin-top: ($h/2.5);
transform: scale(2);
&:after {
content: '';
display: block;
width: 50px;
height: 1px;
background-color: #000;
position: absolute;
bottom: 10%;
left: 70%;
}
}
&::-webkit-slider-runnable-track {
background-color: #fff;
background-image: linear-gradient(90deg, transparent 0, rgba(0,0,0,.5) 1%, transparent 2%);
background-size: $bgsize $bgsize;
background-position: 7px 0;
height: $h;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment