Skip to content

Instantly share code, notes, and snippets.

@tlattimore
Created March 12, 2015 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tlattimore/111df389892cbedc9686 to your computer and use it in GitHub Desktop.
Save tlattimore/111df389892cbedc9686 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<!--<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch" checked>
<label class="onoffswitch-label" for="myonoffswitch">
<span class="onoffswitch-inner"></span>
<span class="onoffswitch-switch"></span>
</label>
</div>
-->
<div class="toggle">
<!-- <input type="checkbox" name="toggleswitch" class="toggle__switch" checked>-->
<label class="toggle__label" for="toggleswitch">
<!--<span class="toggle__state">On</span>
<span class="toggle__state">Off</span>-->
</label>
</div>
// ----
// libsass (v3.1.0)
// ----
body {
background: #f3f4f4;
}
.toggle {
margin: 50px auto ;
background-color: #fff;
width: 100px;
overflow: hidden;
}
.toggle__label {
text-transform: uppercase;
overflow: hidden;
width: 200px;
height: 40px;
display: block;
position: relative;
&:before {
content: 'On';
width: 50px;
height: 40px;
background: #b3e196;
position: absolute;
vertical-align: middle;
z-index:0;
line-height: 2.3;
text-align: center;
color: #fff;
}
}
.toggle__state {
padding: 10px;
z-index: 200;
&:first-child {
color: white;
}
&:last-child {
float: right;
color: #999999;
}
}
body {
background: #f3f4f4; }
.toggle {
margin: 50px auto;
background-color: #fff;
width: 100px;
overflow: hidden; }
.toggle__label {
text-transform: uppercase;
overflow: hidden;
width: 200px;
height: 40px;
display: block;
position: relative; }
.toggle__label:before {
content: 'On';
width: 50px;
height: 40px;
background: #b3e196;
position: absolute;
vertical-align: middle;
z-index: 0;
line-height: 2.3;
text-align: center;
color: #fff; }
.toggle__state {
padding: 10px;
z-index: 200; }
.toggle__state:first-child {
color: white; }
.toggle__state:last-child {
float: right;
color: #999999; }
<!--<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch" checked>
<label class="onoffswitch-label" for="myonoffswitch">
<span class="onoffswitch-inner"></span>
<span class="onoffswitch-switch"></span>
</label>
</div>
-->
<div class="toggle">
<!-- <input type="checkbox" name="toggleswitch" class="toggle__switch" checked>-->
<label class="toggle__label" for="toggleswitch">
<!--<span class="toggle__state">On</span>
<span class="toggle__state">Off</span>-->
</label>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment