mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
245 lines
5.3 KiB
SCSS
245 lines
5.3 KiB
SCSS
|
|
// iOS Item
|
|
// --------------------------------------------------
|
|
|
|
$item-ios-border-color: $list-border-color !default;
|
|
$item-ios-activated-background-color: #d9d9d9 !default;
|
|
$item-ios-font-size: 1.6rem !default;
|
|
|
|
$item-ios-padding-top: 13px !default;
|
|
$item-ios-padding-right: 16px !default;
|
|
$item-ios-padding-bottom: 14px !default;
|
|
$item-ios-padding-left: 16px !default;
|
|
|
|
$item-ios-padding-media-top: 10px !default;
|
|
$item-ios-padding-media-bottom: 10px !default;
|
|
|
|
$item-ios-padding-icon-top: 10px !default;
|
|
$item-ios-padding-icon-bottom: 10px !default;
|
|
|
|
$item-ios-avatar-size: 3.6rem !default;
|
|
$item-ios-thumbnail-size: 5.6rem !default;
|
|
$item-ios-note-color: darken($item-ios-border-color, 10%) !default;
|
|
$item-ios-detail-push-color: $item-ios-border-color !default;
|
|
|
|
$item-ios-divider-bg: #f7f7f7 !default;
|
|
$item-ios-divider-color: #222 !default;
|
|
$item-ios-divider-padding: 5px 15px !default;
|
|
|
|
$item-ios-sliding-content-bg: $background-color !default;
|
|
$item-ios-sliding-transition: transform 250ms ease-in-out !default;
|
|
|
|
|
|
.item-group-title {
|
|
padding: $item-ios-padding-top $item-ios-padding-right $item-ios-padding-bottom $item-ios-padding-left;
|
|
background-color: $item-ios-divider-bg;
|
|
color: $item-ios-divider-color;
|
|
}
|
|
|
|
ion-note {
|
|
color: $item-ios-note-color;
|
|
}
|
|
|
|
.item-group {
|
|
ion-item-group-title {
|
|
border-bottom: 1px solid $item-ios-border-color;
|
|
}
|
|
|
|
.item:first-child {
|
|
.item-inner {
|
|
border-top-width: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
.list {
|
|
|
|
.item {
|
|
margin-top: -1px;
|
|
padding-left: $item-ios-padding-left;
|
|
font-size: $item-ios-font-size;
|
|
|
|
&:first-child {
|
|
border-top: 1px solid $item-ios-border-color;
|
|
|
|
.item-inner {
|
|
border-top-width: 0;
|
|
}
|
|
}
|
|
|
|
&:last-child {
|
|
border-bottom: 1px solid $item-ios-border-color;
|
|
}
|
|
|
|
.item-inner {
|
|
padding-right: ($item-ios-padding-right / 2);
|
|
border-top: 1px solid $item-ios-border-color;
|
|
}
|
|
|
|
ion-item-content {
|
|
margin: $item-ios-padding-top ($item-ios-padding-right / 2) $item-ios-padding-bottom 0;
|
|
}
|
|
}
|
|
|
|
// If the item has the no-lines attribute we want to remove the border from it
|
|
// and the border from the next item if there is one
|
|
.item[no-lines] {
|
|
border-width: 0;
|
|
|
|
.item-inner {
|
|
border-width: 0;
|
|
}
|
|
|
|
+ .item {
|
|
.item-inner {
|
|
border-width: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
[item-left] {
|
|
margin: $item-ios-padding-media-top $item-ios-padding-right $item-ios-padding-media-bottom 0;
|
|
}
|
|
|
|
[item-right] {
|
|
margin: $item-ios-padding-top ($item-ios-padding-right / 2) $item-ios-padding-bottom ($item-ios-padding-left / 2);
|
|
}
|
|
|
|
icon[item-left],
|
|
icon[item-right] {
|
|
margin-top: $item-ios-padding-icon-top;
|
|
margin-bottom: $item-ios-padding-icon-bottom;
|
|
}
|
|
|
|
button[item-left],
|
|
button[item-right],
|
|
[button][item-left],
|
|
[button][item-right] {
|
|
padding: 0 0.5em;
|
|
font-size: 1.3rem;
|
|
min-height: 25px;
|
|
}
|
|
|
|
[item-left].icon-only,
|
|
[item-right].icon-only,
|
|
[item-left].icon-only icon,
|
|
[item-right].icon-only icon,
|
|
[item-left][clear],
|
|
[item-right][clear] {
|
|
padding: 0 1px;
|
|
}
|
|
|
|
[item-left].icon-left icon,
|
|
[item-right].icon-left icon {
|
|
margin-left: 0;
|
|
margin-bottom: 1px;
|
|
padding-right: 0.3em;
|
|
}
|
|
|
|
[item-left].icon-right icon,
|
|
[item-right].icon-right icon {
|
|
margin-right: 0;
|
|
margin-bottom: 1px;
|
|
}
|
|
|
|
ion-avatar {
|
|
min-width: $item-ios-avatar-size;
|
|
min-height: $item-ios-avatar-size;
|
|
|
|
img {
|
|
max-width: $item-ios-avatar-size;
|
|
max-height: $item-ios-avatar-size;
|
|
border-radius: $item-ios-avatar-size / 2;
|
|
}
|
|
}
|
|
|
|
ion-thumbnail {
|
|
min-width: $item-ios-thumbnail-size;
|
|
min-height: $item-ios-thumbnail-size;
|
|
|
|
img {
|
|
max-width: $item-ios-thumbnail-size;
|
|
max-height: $item-ios-thumbnail-size;
|
|
}
|
|
}
|
|
|
|
ion-item-options {
|
|
button, [button] {
|
|
min-height: calc(100% - 2px);
|
|
height: calc(100% - 2px);
|
|
margin: 1px 0 2px 0;
|
|
|
|
border: none;
|
|
border-radius: 0;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
box-sizing: border-box;
|
|
|
|
&:before{
|
|
margin: 0 auto;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.item.activated,
|
|
a.item.activated,
|
|
button.item.activated {
|
|
background-color: $item-ios-activated-background-color;
|
|
transition-duration: 0ms;
|
|
}
|
|
|
|
.item,
|
|
a.item,
|
|
button.item {
|
|
transition-duration: 200ms;
|
|
}
|
|
|
|
.list,
|
|
ion-card {
|
|
button[ion-item]:not([detail-none]),
|
|
a[ion-item]:not([detail-none]) {
|
|
@include ios-detail-push-icon($item-ios-detail-push-color);
|
|
background-repeat: no-repeat;
|
|
background-position: right ($item-ios-padding-right - 2) center;
|
|
background-size: 14px 14px;
|
|
margin-right: 32px;
|
|
}
|
|
}
|
|
|
|
// Hairlines for iOS need to be set at 0.55px to show on iPhone 6 and 6 Plus
|
|
&.hairlines .list {
|
|
|
|
ion-item-options {
|
|
button, [button] {
|
|
min-height: calc(100% - 1px);
|
|
height: calc(100% - 1px);
|
|
margin-top: 0.55px;
|
|
margin-bottom: 0.55px;
|
|
}
|
|
}
|
|
|
|
ion-header + .item {
|
|
border-top-width: 0.55px;
|
|
|
|
.item-inner {
|
|
border-width: 0;
|
|
}
|
|
}
|
|
|
|
.item {
|
|
margin-top: -0.55px;
|
|
border-width: 0.55px;
|
|
|
|
.item-inner {
|
|
border-width: 0.55px;
|
|
}
|
|
|
|
&:first-child {
|
|
.item-inner {
|
|
border-top-width: 0px;
|
|
}
|
|
}
|
|
}
|
|
}
|