mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
189 lines
3.9 KiB
SCSS
189 lines
3.9 KiB
SCSS
|
|
// Material Design Item
|
|
// --------------------------------------------------
|
|
|
|
$item-md-border-color: grayscale(lighten($list-border-color, 8%)) !default;
|
|
$item-md-activated-bg-color: #f1f1f1 !default;
|
|
$item-md-font-size: 1.6rem !default;
|
|
|
|
$item-md-padding-top: 13px !default;
|
|
$item-md-padding-right: 16px !default;
|
|
$item-md-padding-bottom: 13px !default;
|
|
$item-md-padding-left: 16px !default;
|
|
|
|
$item-md-padding-media-top: 9px !default;
|
|
$item-md-padding-media-bottom: 9px !default;
|
|
|
|
$item-md-padding-icon-top: 11px !default;
|
|
$item-md-padding-icon-bottom: 10px !default;
|
|
|
|
$item-md-body-text-font-size: 1.4rem !default;
|
|
$item-md-body-text-line-height: 1.5 !default;
|
|
|
|
$item-md-avatar-size: 4rem !default;
|
|
$item-md-thumbnail-size: 8rem !default;
|
|
$item-md-note-color: darken($item-md-border-color, 10%) !default;
|
|
$item-md-forward-icon-color: $item-md-border-color !default;
|
|
|
|
|
|
.list {
|
|
|
|
.item {
|
|
margin-top: -1px;
|
|
padding-right: ($item-md-padding-right / 2);
|
|
padding-left: ($item-md-padding-left / 2);
|
|
font-size: $item-md-font-size;
|
|
text-transform: none;
|
|
|
|
&:before {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
left: $item-md-padding-left;
|
|
border-top: 1px solid $item-md-border-color;
|
|
content: '';
|
|
pointer-events: none;
|
|
}
|
|
|
|
&:after {
|
|
position: absolute;
|
|
right: 0;
|
|
bottom: 0;
|
|
left: $item-md-padding-left;
|
|
border-top: 1px solid $item-md-border-color;
|
|
content: '';
|
|
pointer-events: none;
|
|
}
|
|
|
|
&:first-child:before,
|
|
&:last-child:after {
|
|
left: 0;
|
|
}
|
|
|
|
&.activated {
|
|
background-color: $item-md-activated-bg-color;
|
|
}
|
|
}
|
|
|
|
ion-header + .item:before {
|
|
left: 0;
|
|
}
|
|
|
|
ion-item-content {
|
|
margin: $item-md-padding-top ($item-md-padding-right / 2) $item-md-padding-bottom ($item-md-padding-left / 2);
|
|
}
|
|
|
|
[item-left],
|
|
[item-right] {
|
|
margin: $item-md-padding-media-top ($item-md-padding-right / 2) $item-md-padding-media-bottom ($item-md-padding-left / 2);
|
|
}
|
|
|
|
icon[item-left],
|
|
icon[item-right] {
|
|
margin-top: $item-md-padding-icon-top;
|
|
margin-bottom: $item-md-padding-icon-bottom;
|
|
}
|
|
|
|
button[item-left],
|
|
button[item-right],
|
|
[button][item-left],
|
|
[button][item-right] {
|
|
padding: 0 0.6em;
|
|
min-height: 26px;
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
[item-left].icon-only,
|
|
[item-right].icon-only,
|
|
[item-left].icon-only icon,
|
|
[item-right].icon-only icon {
|
|
padding: 0 1px;
|
|
}
|
|
|
|
[item-left][clear],
|
|
[item-right][clear] {
|
|
padding: 0 8px;
|
|
}
|
|
|
|
[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;
|
|
}
|
|
|
|
.item-text-wrap ion-item-content {
|
|
font-size: $item-md-body-text-font-size;
|
|
line-height: $item-md-body-text-line-height;
|
|
}
|
|
|
|
.item-note {
|
|
color: $item-md-note-color;
|
|
}
|
|
|
|
.item[actions] ion-item-content {
|
|
margin: 4px;
|
|
}
|
|
|
|
icon + ion-item-content,
|
|
icon + .text-input {
|
|
margin-left: $item-md-padding-left + ($item-md-padding-left / 2);
|
|
}
|
|
|
|
icon[forward] {
|
|
font-size: 2rem;
|
|
color: $item-md-forward-icon-color;
|
|
}
|
|
|
|
.avatar {
|
|
max-width: $item-md-avatar-size;
|
|
max-height: $item-md-avatar-size;
|
|
border-radius: $item-md-avatar-size / 2;
|
|
}
|
|
|
|
.thumbnail {
|
|
max-width: $item-md-thumbnail-size;
|
|
max-height: $item-md-thumbnail-size;
|
|
}
|
|
|
|
h1 {
|
|
margin: 0 0 2px;
|
|
font-size: 2.4rem;
|
|
font-weight: normal;
|
|
}
|
|
|
|
h2 {
|
|
margin: 2px 0 2px;
|
|
font-size: 1.6rem;
|
|
font-weight: normal;
|
|
}
|
|
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6 {
|
|
line-height: normal;
|
|
margin: 2px 0 2px;
|
|
font-size: 1.4rem;
|
|
font-weight: normal;
|
|
}
|
|
|
|
p {
|
|
line-height: normal;
|
|
color: #666;
|
|
font-size: 1.4rem;
|
|
margin: 0 0 2px;
|
|
}
|
|
|
|
button.item.activated {
|
|
box-shadow: none;
|
|
}
|
|
|
|
}
|