123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288 |
- @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: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20'><path d='M2,20l-2-2l8-8L0,2l2-2l10,10L2,20z' fill='#{$item-md-detail-push-color}'/></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;
- }
|