@import "../../themes/ionic.globals.md"; // Material Design Item // -------------------------------------------------- /// @prop - Font size of the item text $item-md-body-text-font-size: 1.4rem !default; /// @prop - line height of the item text $item-md-body-text-line-height: 1.5 !default; /// @prop - Color of the item paragraph $item-md-paragraph-text-color: #666 !default; /// @prop - Font size of the item $item-md-font-size: 1.6rem !default; /// @prop - Size of the avatar in the item $item-md-avatar-size: 40px !default; /// @prop - Border radius of the avatar in the item $item-md-avatar-border-radius: 50% !default; /// @prop - Size of the thumbnail in the item $item-md-thumbnail-size: 80px !default; /// @prop - Shows the detail arrow icon on an item $item-md-detail-push-show: false !default; /// @prop - Color of the detail arrow icon $item-md-detail-push-color: $list-md-border-color !default; /// @prop - Icon for the detail arrow $item-md-detail-push-svg: "" !default; /// @prop - Color for the divider $item-md-divider-color: #858585 !default; /// @prop - Background for the divider $item-md-divider-background: #fff !default; /// @prop - Font size for the divider $item-md-divider-font-size: $item-md-body-text-font-size !default; /// @prop - Border bottom for the divider $item-md-divider-border-bottom: 1px solid $list-md-border-color !default; /// @prop - Background for the sliding content $item-md-sliding-content-background: $list-md-background-color !default; .item-md { @include padding-horizontal($item-md-padding-start, 0); position: relative; font-size: $item-md-font-size; font-weight: normal; text-transform: none; color: $list-md-text-color; background-color: $list-md-background-color; box-shadow: none; transition: background-color 300ms cubic-bezier(.4, 0, .2, 1); } .item-md.activated { background-color: $list-md-activated-background-color; } .item-md[no-lines] { border-width: 0; } .item-md h1 { @include margin(0, 0, 2px); font-size: 2.4rem; font-weight: normal; } .item-md h2 { @include margin(2px, 0); font-size: 1.6rem; font-weight: normal; } .item-md h3, .item-md h4, .item-md h5, .item-md h6 { @include margin(2px, 0); font-size: 1.4rem; font-weight: normal; line-height: normal; } .item-md p { @include margin(0, 0, 2px); overflow: inherit; font-size: 1.4rem; line-height: normal; text-overflow: inherit; color: $item-md-paragraph-text-color; } .item-md.item-block .item-inner { @include padding-horizontal(null, ($item-md-padding-end / 2)); border-bottom: 1px solid $list-md-border-color; } // Material Design Item Detail Push // -------------------------------------------------- // Only show the forward arrow icon if true @if $item-md-detail-push-show == true { .item-md[detail-push] .item-inner, button.item-md:not([detail-none]) .item-inner, a.item-md:not([detail-none]) .item-inner { @include svg-background-image($item-md-detail-push-svg, true); @include padding-horizontal(null, 32px); @include background-position(end, $item-md-padding-end - 2, center); background-repeat: no-repeat; background-size: 14px 14px; } } // Material Design Item Media // -------------------------------------------------- .item-md [item-left], // deprecated .item-md [item-right], // deprecated .item-md [item-start], .item-md [item-end] { @include margin($item-md-padding-media-top, ($item-md-padding-end / 2), $item-md-padding-media-bottom, 0); } .item-md ion-icon[item-left], // deprecated .item-md ion-icon[item-right], // deprecated .item-md ion-icon[item-start], .item-md ion-icon[item-end] { @include margin($item-md-padding-icon-top, null, $item-md-padding-icon-bottom, 0); } .item-md .item-button { @include padding(0, .6em); height: 25px; font-size: 1.2rem; } .item-md .item-button[icon-only] ion-icon, .item-md .item-button[icon-only] { @include padding(0, 1px); } .item-md ion-icon[item-left] + .item-inner, // deprecated .item-md ion-icon[item-left] + .item-input, // deprecated .item-md ion-icon[item-start] + .item-inner, .item-md ion-icon[item-start] + .item-input { @include margin-horizontal($item-md-padding-start + ($item-md-padding-start / 2), null); } .item-md ion-avatar[item-left], // deprecated .item-md ion-thumbnail[item-left], // deprecated .item-md ion-avatar[item-start], .item-md ion-thumbnail[item-start] { @include margin(($item-md-padding-end / 2), $item-md-padding-end, ($item-md-padding-end / 2), 0); } .item-md ion-avatar[item-right], // deprecated .item-md ion-thumbnail[item-right], // deprecated .item-md ion-avatar[item-end], .item-md ion-thumbnail[item-end] { @include margin(($item-md-padding-end / 2)); } // Material Design Item Avatar // -------------------------------------------------- .item-md ion-avatar { min-width: $item-md-avatar-size; min-height: $item-md-avatar-size; } .item-md ion-avatar ion-img, .item-md ion-avatar img { @include border-radius($item-md-avatar-border-radius); overflow: hidden; width: $item-md-avatar-size; height: $item-md-avatar-size; } // Material Design Item Thumbnail // -------------------------------------------------- .item-md ion-thumbnail { min-width: $item-md-thumbnail-size; min-height: $item-md-thumbnail-size; } .item-md ion-thumbnail ion-img, .item-md ion-thumbnail img { width: $item-md-thumbnail-size; height: $item-md-thumbnail-size; } // Material Design Item Group // -------------------------------------------------- ion-item-group .item-md:first-child .item-inner { border-top-width: 0; } ion-item-group .item-md:last-child .item-inner, ion-item-group .item-md .item-wrapper:last-child .item-inner { border: 0; } // Material Design Item Divider // -------------------------------------------------- .item-divider-md { @include padding-horizontal($item-md-padding-start, null); border-bottom: $item-md-divider-border-bottom; font-size: $item-md-divider-font-size; color: $item-md-divider-color; background-color: $item-md-divider-background; } // Generate Material Design Item and Item Divider Colors // -------------------------------------------------- @each $color-name, $color-base, $color-contrast in get-colors($colors-md) { // If there is text with a color it should use this color // and override whatever item sets it to .item-md .text-md-#{$color-name} { color: $color-base; } .item-md-#{$color-name}, .item-divider-md-#{$color-name} { color: $color-contrast; background-color: $color-base; p { color: $color-contrast; } &.activated { background-color: color-shade($color-base); } } } // Material Design Item Sliding // -------------------------------------------------- .list-md ion-item-sliding { background-color: $item-md-sliding-content-background; } // Item reorder // -------------------------------------------------- .item-md ion-reorder { font-size: 1.5em; opacity: .3; }