mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 15:07:13 +08:00
.toggle-item for list items
This commit is contained in:
6
dist/css/ionic-scoped.css
vendored
6
dist/css/ionic-scoped.css
vendored
@ -185,6 +185,8 @@
|
||||
/* also the appearance when the handle is "off" */
|
||||
/* The track when the toggle is "on" */
|
||||
/* the handle when the toggle is "on" */
|
||||
/* make sure list item content have enough padding on right to fit the toggle */
|
||||
/* position the toggle to the right within a list item */
|
||||
@keyframes fadein {
|
||||
from {
|
||||
opacity: 0.7; }
|
||||
@ -2193,7 +2195,9 @@
|
||||
.ionic .toggle input:checked + .handle {
|
||||
background-color: white;
|
||||
-webkit-transform: translate3d(22px, 0, 0); }
|
||||
.ionic .list-item-buttons.toggle {
|
||||
.ionic .toggle-item .list-item-content {
|
||||
padding-right: 99px; }
|
||||
.ionic .toggle-item .toggle {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 15px;
|
||||
|
||||
7
dist/css/ionic.css
vendored
7
dist/css/ionic.css
vendored
@ -2679,7 +2679,12 @@ input[type="checkbox"][readonly] {
|
||||
background-color: white;
|
||||
-webkit-transform: translate3d(22px, 0, 0); }
|
||||
|
||||
.list-item-buttons.toggle {
|
||||
/* make sure list item content have enough padding on right to fit the toggle */
|
||||
.toggle-item .list-item-content {
|
||||
padding-right: 99px; }
|
||||
|
||||
/* position the toggle to the right within a list item */
|
||||
.toggle-item .toggle {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 15px;
|
||||
|
||||
@ -71,7 +71,13 @@
|
||||
-webkit-transform: translate3d( $toggle-width - $toggle-handle-width - ($toggle-border-width * 2) ,0,0);
|
||||
}
|
||||
|
||||
.list-item-buttons.toggle {
|
||||
/* make sure list item content have enough padding on right to fit the toggle */
|
||||
.toggle-item .list-item-content {
|
||||
padding-right: ($list-item-padding * 3) + $toggle-width;
|
||||
}
|
||||
|
||||
/* position the toggle to the right within a list item */
|
||||
.toggle-item .toggle {
|
||||
position: absolute;
|
||||
top: $list-item-padding / 3;
|
||||
right: $list-item-padding;
|
||||
|
||||
@ -18,45 +18,44 @@
|
||||
<main class="content has-header">
|
||||
|
||||
<ul>
|
||||
<li class="list-item">
|
||||
<li class="list-item toggle-item">
|
||||
<div class="list-item-content">
|
||||
Flux Capacitor
|
||||
</div>
|
||||
<label class="list-item-buttons toggle">
|
||||
<label class="toggle">
|
||||
<input type="checkbox" checked>
|
||||
<div class="handle"></div>
|
||||
</label>
|
||||
</li>
|
||||
<li class="list-item">
|
||||
<li class="list-item toggle-item">
|
||||
<div class="list-item-content">
|
||||
1.21 Gigawatts
|
||||
</div>
|
||||
<label class="list-item-buttons toggle">
|
||||
<label class="toggle">
|
||||
<input type="checkbox" checked>
|
||||
<div class="handle"></div>
|
||||
</label>
|
||||
</li>
|
||||
<li class="list-item">
|
||||
<li class="list-item toggle-item">
|
||||
<div class="list-item-content">
|
||||
88 MPH
|
||||
</div>
|
||||
<label class="list-item-buttons toggle">
|
||||
<label class="toggle">
|
||||
<input type="checkbox" checked>
|
||||
<div class="handle"></div>
|
||||
</label>
|
||||
</li>
|
||||
<li class="list-item">
|
||||
<li class="list-item toggle-item">
|
||||
<div class="list-item-content">
|
||||
Plutonium Resupply
|
||||
</div>
|
||||
<label class="list-item-buttons toggle">
|
||||
<label class="toggle">
|
||||
<input type="checkbox">
|
||||
<div class="handle"></div>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</main>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user