mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 21:15:24 +08:00

BREAKING CHANGE: Can now pass contrast to the colors map: ``` $colors-wp: ( primary: ( base: #327eff, contrast: yellow ), secondary: ( base: #32db64, contrast: hotpink ), danger: #d91e18, light: #f4f4f4, dark: #222 ) !default; ``` references #5445
191 lines
3.9 KiB
SCSS
191 lines
3.9 KiB
SCSS
@import "../../globals.wp";
|
|
@import "./item";
|
|
|
|
// Windows Item
|
|
// --------------------------------------------------
|
|
|
|
$item-wp-body-text-font-size: 1.4rem !default;
|
|
$item-wp-body-text-line-height: 1.5 !default;
|
|
$item-wp-body-background-color: $list-wp-background-color !default;
|
|
$item-wp-body-text-color: $list-wp-text-color !default;
|
|
$item-wp-paragraph-text-color: #666 !default;
|
|
|
|
$item-wp-font-size: 1.6rem !default;
|
|
$item-wp-avatar-size: 4rem !default;
|
|
$item-wp-thumbnail-size: 8rem !default;
|
|
$item-wp-note-color: $input-wp-border-color !default;
|
|
|
|
$item-wp-divider-background: #fff !default;
|
|
$item-wp-divider-color: #222 !default;
|
|
$item-wp-divider-padding: 5px 15px !default;
|
|
|
|
$item-wp-sliding-content-background: $list-wp-background-color !default;
|
|
|
|
|
|
.item {
|
|
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;
|
|
|
|
h1 {
|
|
margin: 0 0 2px;
|
|
|
|
font-size: 2.4rem;
|
|
font-weight: normal;
|
|
}
|
|
|
|
h2 {
|
|
margin: 2px 0;
|
|
|
|
font-size: 1.6rem;
|
|
font-weight: normal;
|
|
}
|
|
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6 {
|
|
margin: 2px 0;
|
|
|
|
font-size: 1.4rem;
|
|
font-weight: normal;
|
|
line-height: normal;
|
|
}
|
|
|
|
p {
|
|
margin: 0 0 2px;
|
|
|
|
font-size: 1.4rem;
|
|
line-height: normal;
|
|
color: $item-wp-paragraph-text-color;
|
|
}
|
|
}
|
|
|
|
.item.activated {
|
|
background-color: $list-wp-activated-background-color;
|
|
}
|
|
|
|
.item[no-lines] {
|
|
border-width: 0;
|
|
}
|
|
|
|
.item-inner {
|
|
padding-right: ($item-wp-padding-right / 2);
|
|
|
|
border-bottom: 1px solid $list-wp-border-color;
|
|
}
|
|
|
|
|
|
// Windows Item Media
|
|
// --------------------------------------------------
|
|
|
|
[item-left],
|
|
[item-right] {
|
|
margin: $item-wp-padding-media-top ($item-wp-padding-right / 2) $item-wp-padding-media-bottom 0;
|
|
}
|
|
|
|
ion-icon[item-left],
|
|
ion-icon[item-right] {
|
|
margin-top: $item-wp-padding-icon-top;
|
|
margin-bottom: $item-wp-padding-icon-bottom;
|
|
margin-left: 0;
|
|
}
|
|
|
|
.item-button {
|
|
padding: 0 .6em;
|
|
|
|
height: 25px;
|
|
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.item-button.button-icon-only ion-icon,
|
|
.item-button.button-icon-only {
|
|
padding: 0 1px;
|
|
}
|
|
|
|
[text-wrap] ion-label {
|
|
font-size: $item-wp-body-text-font-size;
|
|
line-height: $item-wp-body-text-line-height;
|
|
}
|
|
|
|
ion-icon[item-left] + .item-inner,
|
|
ion-icon[item-left] + .item-input {
|
|
margin-left: ($item-wp-padding-left / 2);
|
|
}
|
|
|
|
ion-avatar[item-left],
|
|
ion-thumbnail[item-left] {
|
|
margin: ($item-wp-padding-right / 2) $item-wp-padding-right ($item-wp-padding-right / 2) 0;
|
|
}
|
|
|
|
ion-avatar[item-right],
|
|
ion-thumbnail[item-right] {
|
|
margin: ($item-wp-padding-right / 2);
|
|
}
|
|
|
|
ion-avatar {
|
|
min-width: $item-wp-avatar-size;
|
|
min-height: $item-wp-avatar-size;
|
|
|
|
img {
|
|
max-width: $item-wp-avatar-size;
|
|
max-height: $item-wp-avatar-size;
|
|
|
|
border-radius: $item-wp-avatar-size / 2;
|
|
}
|
|
}
|
|
|
|
ion-thumbnail {
|
|
min-width: $item-wp-thumbnail-size;
|
|
min-height: $item-wp-thumbnail-size;
|
|
|
|
img {
|
|
max-width: $item-wp-thumbnail-size;
|
|
max-height: $item-wp-thumbnail-size;
|
|
}
|
|
}
|
|
|
|
ion-note {
|
|
color: $item-wp-note-color;
|
|
}
|
|
|
|
|
|
// Windows Item Divider
|
|
// --------------------------------------------------
|
|
|
|
ion-item-divider {
|
|
padding: $item-wp-padding-top $item-wp-padding-right $item-wp-padding-bottom $item-wp-padding-left;
|
|
|
|
color: $item-wp-divider-color;
|
|
background-color: $item-wp-divider-background;
|
|
}
|
|
|
|
|
|
// Generate Windows Item Divider Colors
|
|
// --------------------------------------------------
|
|
|
|
@each $color-name, $color-base, $color-contrast in get-colors($colors-wp) {
|
|
ion-item-divider[#{$color-name}] {
|
|
color: $color-contrast;
|
|
background-color: $color-base;
|
|
}
|
|
}
|
|
|
|
|
|
// Windows Item Sliding
|
|
// --------------------------------------------------
|
|
|
|
ion-item-sliding {
|
|
background-color: $item-wp-sliding-content-background;
|
|
}
|