mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 15:07:13 +08:00
checkbox active state fix
This commit is contained in:
18
dist/css/ionic.css
vendored
18
dist/css/ionic.css
vendored
@ -4215,18 +4215,28 @@ input[type="checkbox"][readonly] {
|
||||
opacity: 1; }
|
||||
|
||||
/* make sure item content have enough padding on left to fit the checkbox */
|
||||
.item-checkbox .item-content {
|
||||
.item-checkbox {
|
||||
padding-left: 58px; }
|
||||
.item-checkbox.active, .item-checkbox:active {
|
||||
box-shadow: none; }
|
||||
|
||||
/* position the checkbox to the left within an item */
|
||||
.item-checkbox .checkbox {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -moz-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
-webkit-align-items: center;
|
||||
-moz-align-items: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 7.5px;
|
||||
z-index: 3;
|
||||
display: flex;
|
||||
height: 100%;
|
||||
align-items: center; }
|
||||
height: 100%; }
|
||||
|
||||
/**
|
||||
* Toggle
|
||||
|
||||
@ -64,17 +64,22 @@
|
||||
}
|
||||
|
||||
/* make sure item content have enough padding on left to fit the checkbox */
|
||||
.item-checkbox .item-content {
|
||||
.item-checkbox {
|
||||
padding-left: ($item-padding * 2) + $checkbox-width;
|
||||
|
||||
&.active,
|
||||
&:active {
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* position the checkbox to the left within an item */
|
||||
.item-checkbox .checkbox {
|
||||
@include display-flex();
|
||||
@include align-items(center);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: $item-padding / 2;
|
||||
z-index: 3;
|
||||
display: flex;
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@ -17,36 +17,28 @@
|
||||
|
||||
<ul class="list">
|
||||
<li class="item item-checkbox">
|
||||
<div class="item-content">
|
||||
Flux Capacitor
|
||||
</div>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" checked>
|
||||
</label>
|
||||
Flux Capacitor
|
||||
</li>
|
||||
<li class="item item-checkbox">
|
||||
<div class="item-content">
|
||||
1.21 Gigawatts
|
||||
</div>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" checked>
|
||||
</label>
|
||||
1.21 Gigawatts
|
||||
</li>
|
||||
<li class="item item-checkbox">
|
||||
<div class="item-content">
|
||||
88 MPH
|
||||
</div>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" checked>
|
||||
</label>
|
||||
88 MPH
|
||||
</li>
|
||||
<li class="item item-checkbox">
|
||||
<div class="item-content">
|
||||
Plutonium Resupply
|
||||
</div>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox">
|
||||
</label>
|
||||
Plutonium Resupply
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user