Last active
September 11, 2015 19:23
-
-
Save chancancode/7482173acd43f48c21d0 to your computer and use it in GitHub Desktop.
New Twiddle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} | |
toggle-button { | |
position: relative; | |
top: 9px; | |
display: inline-block; | |
width: 60px; | |
height: 25px; | |
border: 2px solid #dedede; | |
border-radius: 15px; | |
background: #fafafa; | |
overflow: hidden; | |
-webkit-touch-callout: none; | |
-webkit-user-select: none; | |
-moz-user-select: none; | |
-ms-user-select: none; | |
user-select: none; | |
} | |
toggle-button .switch { | |
position: absolute; | |
top: 0px; | |
left: -36px; | |
bottom: 0px; | |
width: 95px; | |
transition: left 0.25s; | |
} | |
toggle-button .label { | |
position: absolute; | |
top: 0px; | |
display: block; | |
padding: 0px 12px; | |
width: 23.5px; | |
height: 25px; | |
line-height: 26px; | |
font-size: 12px; | |
} | |
toggle-button .label.on { | |
left: 0; | |
text-align: left; | |
background: #66ee66; | |
color: #ffffff; | |
} | |
toggle-button .label.off { | |
right: 0; | |
text-align: right; | |
color: #dedede; | |
} | |
toggle-button .toggle { | |
position: absolute; | |
top: -1px; | |
left: 50%; | |
display: inline-block; | |
width: 25px; | |
height: 25px; | |
margin: 0px 0px 0px -13px; | |
border: 1px solid #dedede; | |
border-radius: 15px; | |
background: #ffffff; | |
} | |
toggle-button[aria-pressed=true] .switch { | |
left: 0px; | |
} | |
toggle-button[aria-disabled=true] { | |
opacity: 0.3; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.4.10", | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"hax": "https://cdn.rawgit.com/chancancode/5b7b95b6268d51cdcaae/raw/92e0654083305c73cd601381a6cea705be9f8890/hax.js", | |
"ember": "http://builds.emberjs.com/canary/ember.debug.js", | |
"ember-template-compiler": "http://builds.emberjs.com/canary/ember-template-compiler.js" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment