mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
material lists/cards
This commit is contained in:
@ -2,39 +2,40 @@
|
|||||||
// Material Design Card
|
// Material Design Card
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
$card-md-background-color: #fff !default;
|
$card-md-background-color: #fff !default;
|
||||||
$card-md-box-shadow: $md-whiteframe-shadow-z1;
|
$card-md-box-shadow: 0 1px 2px rgba(0,0,0,.3) !default;
|
||||||
$card-md-border-radius: 2px !default;
|
$card-md-border-radius: 2px !default;
|
||||||
$card-md-font-size: 1.4rem !default;
|
$card-md-font-size: 1.4rem !default;
|
||||||
$card-md-item-content-padding: 15px !default;
|
|
||||||
|
$card-md-header-background-color: $card-md-background-color !default;
|
||||||
|
$card-md-header-padding: 10px;
|
||||||
|
$card-md-footer-background-color: $card-md-background-color !default;
|
||||||
|
$card-md-footer-padding: 10px;
|
||||||
|
|
||||||
|
|
||||||
.card[mode="md"] {
|
.card[mode="md"] {
|
||||||
background: $card-md-background-color;
|
background: $card-md-background-color;
|
||||||
box-shadow: $card-md-box-shadow;
|
box-shadow: $card-md-box-shadow;
|
||||||
border-radius: $card-md-border-radius;
|
border-radius: $card-md-border-radius;
|
||||||
font-size: $card-md-font-size;
|
font-size: $card-md-font-size;
|
||||||
|
|
||||||
.item,
|
.item::before,
|
||||||
.item-content {
|
.item::after {
|
||||||
padding: 0;
|
left: 0;
|
||||||
background: transparent;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.item:last-of-type .item-content:after {
|
.item:first-child:before {
|
||||||
background: transparent;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-header {
|
.card-header {
|
||||||
font-size: 1.7rem;
|
padding: $card-md-header-padding;
|
||||||
|
background-color: $card-md-footer-background-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-footer {
|
.card-footer {
|
||||||
color: #6d6d72;
|
padding: $card-md-footer-padding;
|
||||||
}
|
background-color: $card-md-footer-background-color;
|
||||||
|
|
||||||
.item-content {
|
|
||||||
padding: $card-md-item-content-padding
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,24 +1,100 @@
|
|||||||
$item-material-min-height: 56px;
|
|
||||||
$item-material-font-size: 16px;
|
// Material Design Item
|
||||||
$item-material-label-color: #222;
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
$item-md-border-color: #c8c7cc !default;
|
||||||
|
$item-md-font-size: 1.6rem !default;
|
||||||
|
|
||||||
|
$item-md-padding-top: 13px !default;
|
||||||
|
$item-md-padding-right: 15px !default;
|
||||||
|
$item-md-padding-bottom: 14px !default;
|
||||||
|
$item-md-padding-left: 15px !default;
|
||||||
|
|
||||||
|
$item-md-avatar-size: 4rem !default;
|
||||||
|
$item-md-thumbnail-size: 8rem !default;
|
||||||
|
$item-md-note-color: #999 !default;
|
||||||
|
|
||||||
|
|
||||||
.list[mode="md"] {
|
.list[mode="md"] {
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
padding-left: 16px;
|
font-size: $item-md-font-size;
|
||||||
|
margin-top: -1px;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
position: absolute;
|
||||||
|
content: '';
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
border-top: 1px solid $item-md-border-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
position: absolute;
|
||||||
|
content: '';
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
border-top: 1px solid $item-md-border-color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-content {
|
.text-input,
|
||||||
min-height: $item-material-min-height;
|
.input-label,
|
||||||
padding: 16px 16px 16px 0px;
|
.item-media,
|
||||||
border-bottom: 1px solid #DBDBDB;
|
.item-content,
|
||||||
|
.item-note {
|
||||||
|
margin: $item-md-padding-top $item-md-padding-right $item-md-padding-bottom $item-md-padding-left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-media {
|
.item-note {
|
||||||
display: block;
|
color: $item-md-note-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-label {
|
.item > icon {
|
||||||
color: $item-material-label-color;
|
margin-left: $item-md-padding-left;
|
||||||
font-size: $item-material-font-size;
|
margin-right: $item-md-padding-right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
icon[forward] {
|
||||||
|
font-size: 2rem;
|
||||||
|
color: #cfcfcf;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
margin: 0 $item-md-padding-right 0 $item-md-padding-left;
|
||||||
|
padding: 2px 6px;
|
||||||
|
min-height: 26px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
margin-right: $item-md-padding-right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vertical-align-top {
|
||||||
|
button,
|
||||||
|
[button] {
|
||||||
|
margin-top: $item-md-padding-top;
|
||||||
|
}
|
||||||
|
> icon {
|
||||||
|
margin-top: $item-md-padding-top / 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
button.item.activated {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
a.item,
|
a.item,
|
||||||
button.item {
|
button.item.item {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
@ -26,6 +26,8 @@ button.item {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
justify-content: inherit;
|
justify-content: inherit;
|
||||||
|
box-shadow: none;
|
||||||
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-content {
|
.item-content {
|
||||||
|
@ -1,2 +1,30 @@
|
|||||||
|
|
||||||
|
// Material Design List
|
||||||
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
$list-md-header-padding: 30px $item-md-padding-right 10px $item-md-padding-left !default;
|
||||||
|
$list-md-header-font-size: 1.2rem !default;
|
||||||
|
$list-md-header-color: #6d6d72 !default;
|
||||||
|
|
||||||
|
$list-md-footer-padding: 10px $item-md-padding-right 0 $item-md-padding-left !default;
|
||||||
|
$list-md-footer-font-size: 1.2rem !default;
|
||||||
|
$list-md-footer-color: #8f8f94 !default;
|
||||||
|
|
||||||
|
|
||||||
.list[mode="md"] {
|
.list[mode="md"] {
|
||||||
|
|
||||||
|
.list-header {
|
||||||
|
padding: $list-md-header-padding;
|
||||||
|
font-size: $list-md-header-font-size;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: $list-md-header-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-footer {
|
||||||
|
padding: $list-md-footer-padding;
|
||||||
|
font-size: $list-md-footer-font-size;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: $list-md-footer-color;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user