fix(checkbox): end position by default

This commit is contained in:
Manu Mtz.-Almeida
2018-10-31 14:35:56 +01:00
committed by Manu MA
parent 00544e9106
commit 9da51b3984
5 changed files with 20 additions and 12 deletions

View File

@ -69,14 +69,14 @@
// iOS Checkbox Within An Item
// -----------------------------------------
// :host-context(.item)
:host(.in-item) {
@include margin($checkbox-ios-item-start-margin-top, $checkbox-ios-item-start-margin-end, $checkbox-ios-item-start-margin-bottom, $checkbox-ios-item-start-margin-start);
// end position by default
@include margin($checkbox-ios-item-end-margin-top, $checkbox-ios-item-end-margin-end, $checkbox-ios-item-end-margin-bottom, $checkbox-ios-item-end-margin-start);
display: block;
position: static;
}
:host(.in-item[slot="end"]) {
@include margin($checkbox-ios-item-end-margin-top, $checkbox-ios-item-end-margin-end, $checkbox-ios-item-end-margin-bottom, $checkbox-ios-item-end-margin-start);
:host(.in-item[slot="start"]) {
@include margin($checkbox-ios-item-start-margin-top, $checkbox-ios-item-start-margin-end, $checkbox-ios-item-start-margin-bottom, $checkbox-ios-item-start-margin-start);
}

View File

@ -73,14 +73,15 @@
// -----------------------------------------
:host(.in-item) {
@include margin($checkbox-md-item-start-margin-top, $checkbox-md-item-start-margin-end, $checkbox-md-item-start-margin-bottom, $checkbox-md-item-start-margin-start);
// end position by default
@include margin($checkbox-md-item-end-margin-top, $checkbox-md-item-end-margin-end, $checkbox-md-item-end-margin-bottom, $checkbox-md-item-end-margin-start);
display: block;
position: static;
}
:host(.in-item[slot="end"]) {
@include margin($checkbox-md-item-end-margin-top, $checkbox-md-item-end-margin-end, $checkbox-md-item-end-margin-bottom, $checkbox-md-item-end-margin-start);
:host(.in-item[slot="start"]) {
@include margin($checkbox-md-item-start-margin-top, $checkbox-md-item-start-margin-end, $checkbox-md-item-start-margin-bottom, $checkbox-md-item-start-margin-start);
}
// REVIEW

View File

@ -24,6 +24,7 @@
position: relative;
user-select: none;
z-index: $z-index-item-input;
}
:host(.ion-color) {

View File

@ -27,7 +27,7 @@
<ion-item>
<ion-label>Primary</ion-label>
<ion-checkbox checked color="primary"></ion-checkbox>
<ion-checkbox checked color="primary" slot="end"></ion-checkbox>
</ion-item>
<ion-item>
@ -50,24 +50,29 @@
<ion-checkbox checked color="warning"></ion-checkbox>
</ion-item>
<ion-item>
<ion-label>Dark</ion-label>
<ion-checkbox checked color="dark" style="--size: 100px;"></ion-checkbox>
</ion-item>
<ion-item>
<ion-label>Danger</ion-label>
<ion-checkbox checked color="danger"></ion-checkbox>
<ion-checkbox checked color="danger" slot="start"></ion-checkbox>
</ion-item>
<ion-item>
<ion-label>Light</ion-label>
<ion-checkbox checked color="light"></ion-checkbox>
<ion-checkbox checked color="light" slot="start"></ion-checkbox>
</ion-item>
<ion-item>
<ion-label>Medium</ion-label>
<ion-checkbox checked color="medium"></ion-checkbox>
<ion-checkbox checked color="medium" slot="start"></ion-checkbox>
</ion-item>
<ion-item>
<ion-label>Dark</ion-label>
<ion-checkbox checked color="dark" style="--size: 100px;"></ion-checkbox>
<ion-checkbox checked color="dark" slot="start" style="--size: 100px;"></ion-checkbox>
</ion-item>
<ion-item>

View File

@ -57,6 +57,7 @@ $z-index-backdrop: 2;
$z-index-overlay-wrapper: 10;
$z-index-item-options: 1;
$z-index-item-input: 2;
$z-index-item-divider: 100;
$z-index-reorder-selected: 100;