mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 23:16:52 +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; }
|
opacity: 1; }
|
||||||
|
|
||||||
/* make sure item content have enough padding on left to fit the checkbox */
|
/* make sure item content have enough padding on left to fit the checkbox */
|
||||||
.item-checkbox .item-content {
|
.item-checkbox {
|
||||||
padding-left: 58px; }
|
padding-left: 58px; }
|
||||||
|
.item-checkbox.active, .item-checkbox:active {
|
||||||
|
box-shadow: none; }
|
||||||
|
|
||||||
/* position the checkbox to the left within an item */
|
/* position the checkbox to the left within an item */
|
||||||
.item-checkbox .checkbox {
|
.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;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 7.5px;
|
left: 7.5px;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
display: flex;
|
height: 100%; }
|
||||||
height: 100%;
|
|
||||||
align-items: center; }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggle
|
* Toggle
|
||||||
|
|||||||
@ -64,17 +64,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* make sure item content have enough padding on left to fit the checkbox */
|
/* 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;
|
padding-left: ($item-padding * 2) + $checkbox-width;
|
||||||
|
|
||||||
|
&.active,
|
||||||
|
&:active {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* position the checkbox to the left within an item */
|
/* position the checkbox to the left within an item */
|
||||||
.item-checkbox .checkbox {
|
.item-checkbox .checkbox {
|
||||||
|
@include display-flex();
|
||||||
|
@include align-items(center);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: $item-padding / 2;
|
left: $item-padding / 2;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
display: flex;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
align-items: center;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,36 +17,28 @@
|
|||||||
|
|
||||||
<ul class="list">
|
<ul class="list">
|
||||||
<li class="item item-checkbox">
|
<li class="item item-checkbox">
|
||||||
<div class="item-content">
|
|
||||||
Flux Capacitor
|
|
||||||
</div>
|
|
||||||
<label class="checkbox">
|
<label class="checkbox">
|
||||||
<input type="checkbox" checked>
|
<input type="checkbox" checked>
|
||||||
</label>
|
</label>
|
||||||
|
Flux Capacitor
|
||||||
</li>
|
</li>
|
||||||
<li class="item item-checkbox">
|
<li class="item item-checkbox">
|
||||||
<div class="item-content">
|
|
||||||
1.21 Gigawatts
|
|
||||||
</div>
|
|
||||||
<label class="checkbox">
|
<label class="checkbox">
|
||||||
<input type="checkbox" checked>
|
<input type="checkbox" checked>
|
||||||
</label>
|
</label>
|
||||||
|
1.21 Gigawatts
|
||||||
</li>
|
</li>
|
||||||
<li class="item item-checkbox">
|
<li class="item item-checkbox">
|
||||||
<div class="item-content">
|
|
||||||
88 MPH
|
|
||||||
</div>
|
|
||||||
<label class="checkbox">
|
<label class="checkbox">
|
||||||
<input type="checkbox" checked>
|
<input type="checkbox" checked>
|
||||||
</label>
|
</label>
|
||||||
|
88 MPH
|
||||||
</li>
|
</li>
|
||||||
<li class="item item-checkbox">
|
<li class="item item-checkbox">
|
||||||
<div class="item-content">
|
|
||||||
Plutonium Resupply
|
|
||||||
</div>
|
|
||||||
<label class="checkbox">
|
<label class="checkbox">
|
||||||
<input type="checkbox">
|
<input type="checkbox">
|
||||||
</label>
|
</label>
|
||||||
|
Plutonium Resupply
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user