-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize css, add sizes, defaultSize
- Loading branch information
Ilya Radchenko
committed
Oct 14, 2014
1 parent
f4bd85b
commit 579bbdb
Showing
11 changed files
with
259 additions
and
58 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
{{input id=generatedId type='checkbox' checked=toggled viewName='inputCheckbox'}} | ||
<label class='x-toggle-btn' {{bind-attr for=generatedId data-tg-off=off data-tg-on=on}}></label> | ||
{{input id=forId type='checkbox' checked=toggled class='x-toggle'}} | ||
<label {{bind-attr class=':x-toggle-btn themeClass sizeClass' | ||
for=forId | ||
data-tg-off=off | ||
data-tg-on=on}}> | ||
</label> |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,33 @@ | ||
.x-toggle-default + .x-toggle-btn { | ||
.x-toggle-default.x-toggle-btn { | ||
padding: 0.1em; | ||
background-color: #E7E7E7; | ||
border-radius: 0.2em; | ||
transition: background-color 0.2s; | ||
} | ||
|
||
.x-toggle-default:checked + .x-toggle-btn { | ||
.x-toggle:checked + .x-toggle-default.x-toggle-btn { | ||
background-color: #797979; | ||
} | ||
|
||
.x-toggle-default + .x-toggle-btn:after { | ||
.x-toggle-default.x-toggle-btn:after { | ||
background-color: #FFFFFF; | ||
transition: left 0.2s; | ||
border-radius: 0.2em; | ||
} | ||
|
||
.x-toggle-default-small { | ||
width: 3em; | ||
height: 1.6em; | ||
} | ||
|
||
.x-toggle-default.x-toggle-default-medium { | ||
width: 4em; | ||
height: 2.1em; | ||
padding: 3px; | ||
} | ||
|
||
.x-toggle-default.x-toggle-default-large { | ||
width: 4.7em; | ||
height: 2.6em; | ||
padding: 4px; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,42 @@ | ||
.x-toggle-flat + .x-toggle-btn { | ||
.x-toggle-flat.x-toggle-btn { | ||
padding: 2px; | ||
-webkit-transition: all .2s ease; | ||
transition: all .2s ease; | ||
background: #fff; | ||
border: 4px solid #f2f2f2; | ||
border-radius: 2em; | ||
} | ||
.x-toggle-flat + .x-toggle-btn:after { | ||
|
||
.x-toggle-flat.x-toggle-btn:after { | ||
-webkit-transition: all .2s ease; | ||
transition: all .2s ease; | ||
background: #f2f2f2; | ||
content: ""; | ||
border-radius: 1em; | ||
} | ||
.x-toggle-flat:checked + .x-toggle-btn { | ||
|
||
.x-toggle:checked + .x-toggle-flat.x-toggle-btn { | ||
border: 4px solid #7FC6A6; | ||
} | ||
.x-toggle-flat:checked + .x-toggle-btn:after { | ||
|
||
.x-toggle:checked + .x-toggle-flat.x-toggle-btn:after { | ||
left: 50%; | ||
background: #7FC6A6; | ||
} | ||
|
||
.x-toggle-flat-small { | ||
width: 3em; | ||
height: 1.6em; | ||
} | ||
|
||
.x-toggle-flat.x-toggle-flat-medium { | ||
width: 4em; | ||
height: 2.1em; | ||
padding: 3px; | ||
} | ||
|
||
.x-toggle-flat.x-toggle-flat-large { | ||
width: 4.7em; | ||
height: 2.6em; | ||
padding: 4px; | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,53 @@ | ||
.x-toggle-ios + .x-toggle-btn { | ||
.x-toggle-ios.x-toggle-btn { | ||
background: #fbfbfb; | ||
border-radius: 2em; | ||
padding: 2px; | ||
-webkit-transition: all .4s ease; | ||
transition: all .4s ease; | ||
border: 1px solid #e8eae9; | ||
} | ||
.x-toggle-ios + .x-toggle-btn:after { | ||
|
||
.x-toggle-ios.x-toggle-btn:after { | ||
border-radius: 2em; | ||
background: #fbfbfb; | ||
-webkit-transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), padding 0.3s ease, margin 0.3s ease; | ||
transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), padding 0.3s ease, margin 0.3s ease; | ||
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 4px 0 rgba(0, 0, 0, 0.08); | ||
} | ||
.x-toggle-ios + .x-toggle-btn:active { | ||
|
||
.x-toggle-ios.x-toggle-btn:active { | ||
box-shadow: inset 0 0 0 2em #e8eae9; | ||
} | ||
.x-toggle-ios + .x-toggle-btn:active:after { | ||
|
||
.x-toggle-ios.x-toggle-btn:active:after { | ||
padding-right: .8em; | ||
} | ||
.x-toggle-ios:checked + .x-toggle-btn { | ||
|
||
.x-toggle:checked + .x-toggle-ios.x-toggle-btn { | ||
background: #86d993; | ||
} | ||
.x-toggle-ios:checked + .x-toggle-btn:active { | ||
|
||
.x-toggle:checked + .x-toggle-ios.x-toggle-btn:active { | ||
box-shadow: none; | ||
} | ||
.x-toggle-ios:checked + .x-toggle-btn:active:after { | ||
|
||
.x-toggle:checked + .x-toggle-ios.x-toggle-btn:active:after { | ||
margin-left: -.8em; | ||
} | ||
|
||
.x-toggle-ios-small { | ||
width: 3em; | ||
height: 1.6em; | ||
} | ||
|
||
.x-toggle-ios.x-toggle-ios-medium { | ||
width: 4em; | ||
height: 2.1em; | ||
padding: 3px; | ||
} | ||
|
||
.x-toggle-ios.x-toggle-ios-large { | ||
width: 4.7em; | ||
height: 2.6em; | ||
padding: 4px; | ||
} |
Oops, something went wrong.