mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
275 lines
6.4 KiB
SCSS
275 lines
6.4 KiB
SCSS
@import "../../themes/ionic.globals.wp";
|
|
|
|
// Windows Item
|
|
// --------------------------------------------------
|
|
|
|
/// @prop - Font size of the item text
|
|
$item-wp-body-text-font-size: 1.4rem !default;
|
|
|
|
/// @prop - line height of the item text
|
|
$item-wp-body-text-line-height: 1.5 !default;
|
|
|
|
/// @prop - Background color of the item
|
|
$item-wp-body-background-color: $list-wp-background-color !default;
|
|
|
|
/// @prop - Color of the item text
|
|
$item-wp-body-text-color: $list-wp-text-color !default;
|
|
|
|
/// @prop - Color of the item paragraph
|
|
$item-wp-paragraph-text-color: #666 !default;
|
|
|
|
/// @prop - Font size of the item
|
|
$item-wp-font-size: 1.6rem !default;
|
|
|
|
/// @prop - Size of the avatar in the item
|
|
$item-wp-avatar-size: 40px !default;
|
|
|
|
/// @prop - Border radius of the avatar in the item
|
|
$item-wp-avatar-border-radius: 50% !default;
|
|
|
|
/// @prop - Size of the thumbnail in the item
|
|
$item-wp-thumbnail-size: 80px !default;
|
|
|
|
/// @prop - Shows the detail arrow icon on an item
|
|
$item-wp-detail-push-show: false !default;
|
|
|
|
/// @prop - Color of the detail arrow icon
|
|
$item-wp-detail-push-color: $input-wp-border-color !default;
|
|
|
|
/// @prop - Icon for the detail arrow
|
|
$item-wp-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-wp-detail-push-color}'/></svg>" !default;
|
|
|
|
/// @prop - Color for the divider
|
|
$item-wp-divider-color: $list-wp-text-color !default;
|
|
|
|
/// @prop - Background for the divider
|
|
$item-wp-divider-background: #fff !default;
|
|
|
|
/// @prop - Bodrer bottom for the divider
|
|
$item-wp-divider-border-bottom: 1px solid $list-wp-border-color !default;
|
|
|
|
/// @prop - Font size for the divider
|
|
$item-wp-divider-font-size: 2rem !default;
|
|
|
|
/// @prop - Padding for the divider
|
|
$item-wp-divider-padding: 5px 15px !default;
|
|
|
|
/// @prop - Background for the sliding content
|
|
$item-wp-sliding-content-background: $list-wp-background-color !default;
|
|
|
|
|
|
.item-wp {
|
|
position: relative;
|
|
|
|
padding-right: 0;
|
|
padding-left: ($item-wp-padding-left);
|
|
|
|
font-size: $item-wp-font-size;
|
|
font-weight: normal;
|
|
text-transform: none;
|
|
|
|
color: $item-wp-body-text-color;
|
|
background-color: $item-wp-body-background-color;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.item-wp.activated {
|
|
background-color: $list-wp-activated-background-color;
|
|
}
|
|
|
|
.item-wp[no-lines] {
|
|
border-width: 0;
|
|
}
|
|
|
|
.item-wp h1 {
|
|
margin: 0 0 2px;
|
|
|
|
font-size: 2.4rem;
|
|
font-weight: normal;
|
|
}
|
|
|
|
.item-wp h2 {
|
|
margin: 2px 0;
|
|
|
|
font-size: 1.6rem;
|
|
font-weight: normal;
|
|
}
|
|
|
|
.item-wp h3,
|
|
.item-wp h4,
|
|
.item-wp h5,
|
|
.item-wp h6 {
|
|
margin: 2px 0;
|
|
|
|
font-size: 1.4rem;
|
|
font-weight: normal;
|
|
line-height: normal;
|
|
}
|
|
|
|
.item-wp p {
|
|
overflow: inherit;
|
|
|
|
margin: 0 0 2px;
|
|
|
|
font-size: 1.4rem;
|
|
line-height: normal;
|
|
text-overflow: inherit;
|
|
color: $item-wp-paragraph-text-color;
|
|
}
|
|
|
|
.item-wp.item-block .item-inner {
|
|
padding-right: ($item-wp-padding-right / 2);
|
|
|
|
border-bottom: 1px solid $list-wp-border-color;
|
|
}
|
|
|
|
|
|
// Windows Item Detail Push
|
|
// --------------------------------------------------
|
|
|
|
// Only show the forward arrow icon if true
|
|
@if $item-wp-detail-push-show == true {
|
|
.item-wp[detail-push] .item-inner,
|
|
button.item-wp:not([detail-none]) .item-inner,
|
|
a.item-wp:not([detail-none]) .item-inner {
|
|
@include svg-background-image($item-wp-detail-push-svg);
|
|
|
|
padding-right: 32px;
|
|
|
|
background-repeat: no-repeat;
|
|
background-position: right ($item-wp-padding-right - 2) center;
|
|
background-size: 14px 14px;
|
|
}
|
|
}
|
|
|
|
|
|
// Windows Item Media
|
|
// --------------------------------------------------
|
|
|
|
.item-wp [item-left],
|
|
.item-wp [item-right] {
|
|
margin: $item-wp-padding-media-top ($item-wp-padding-right / 2) $item-wp-padding-media-bottom 0;
|
|
}
|
|
|
|
.item-wp ion-icon[item-left],
|
|
.item-wp ion-icon[item-right] {
|
|
margin-top: $item-wp-padding-icon-top;
|
|
margin-bottom: $item-wp-padding-icon-bottom;
|
|
margin-left: 0;
|
|
}
|
|
|
|
.item-wp .item-button {
|
|
padding: 0 .6em;
|
|
|
|
height: 25px;
|
|
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.item-wp .item-button[icon-only] ion-icon,
|
|
.item-wp .item-button[icon-only] {
|
|
padding: 0 1px;
|
|
}
|
|
|
|
.item-wp[text-wrap] ion-label {
|
|
font-size: $item-wp-body-text-font-size;
|
|
line-height: $item-wp-body-text-line-height;
|
|
}
|
|
|
|
.item-wp ion-icon[item-left] + .item-inner,
|
|
.item-wp ion-icon[item-left] + .item-input {
|
|
margin-left: ($item-wp-padding-left / 2);
|
|
}
|
|
|
|
.item-wp ion-avatar[item-left],
|
|
.item-wp ion-thumbnail[item-left] {
|
|
margin: ($item-wp-padding-right / 2) $item-wp-padding-right ($item-wp-padding-right / 2) 0;
|
|
}
|
|
|
|
.item-wp ion-avatar[item-right],
|
|
.item-wp ion-thumbnail[item-right] {
|
|
margin: ($item-wp-padding-right / 2);
|
|
}
|
|
|
|
|
|
// Windows Item Avatar
|
|
// --------------------------------------------------
|
|
|
|
.item-wp ion-avatar {
|
|
min-width: $item-wp-avatar-size;
|
|
min-height: $item-wp-avatar-size;
|
|
}
|
|
|
|
.item-wp ion-avatar ion-img,
|
|
.item-wp ion-avatar img {
|
|
overflow: hidden;
|
|
|
|
width: $item-wp-avatar-size;
|
|
height: $item-wp-avatar-size;
|
|
|
|
border-radius: $item-wp-avatar-border-radius;
|
|
}
|
|
|
|
|
|
// Windows Item Thumbnail
|
|
// --------------------------------------------------
|
|
|
|
.item-wp ion-thumbnail {
|
|
min-width: $item-wp-thumbnail-size;
|
|
min-height: $item-wp-thumbnail-size;
|
|
}
|
|
|
|
.item-wp ion-thumbnail ion-img,
|
|
.item-wp ion-thumbnail img {
|
|
width: $item-wp-thumbnail-size;
|
|
height: $item-wp-thumbnail-size;
|
|
}
|
|
|
|
|
|
// Windows Item Divider
|
|
// --------------------------------------------------
|
|
|
|
.item-divider-wp {
|
|
padding-left: $item-wp-padding-left;
|
|
|
|
border-bottom: $item-wp-divider-border-bottom;
|
|
font-size: $item-wp-divider-font-size;
|
|
|
|
color: $item-wp-divider-color;
|
|
background-color: $item-wp-divider-background;
|
|
}
|
|
|
|
|
|
// Generate Windows Item and Item Divider Colors
|
|
// --------------------------------------------------
|
|
|
|
@each $color-name, $color-base, $color-contrast in get-colors($colors-wp) {
|
|
// If there is text with a color it should use this color
|
|
// and override whatever item sets it to
|
|
.item-wp .text-wp-#{$color-name} {
|
|
color: $color-base;
|
|
}
|
|
|
|
.item-wp-#{$color-name},
|
|
.item-divider-wp-#{$color-name} {
|
|
color: $color-contrast;
|
|
background-color: $color-base;
|
|
|
|
p {
|
|
color: $color-contrast;
|
|
}
|
|
|
|
&.activated {
|
|
background-color: color-shade($color-base);
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// Windows Item Sliding
|
|
// --------------------------------------------------
|
|
|
|
.list-wp ion-item-sliding {
|
|
background-color: $item-wp-sliding-content-background;
|
|
}
|