vant/packages/card/index.less
2019-01-22 22:04:44 +08:00

105 lines
1.5 KiB
Plaintext

@import '../style/var';
@import '../style/mixins/ellipsis';
.van-card {
position: relative;
color: @text-color;
font-size: 12px;
padding: 5px 15px;
box-sizing: border-box;
background-color: @background-color-light;
&:not(:first-child) {
margin-top: 10px;
}
&__header {
display: flex;
}
&__thumb {
position: relative;
width: 90px;
height: 90px;
margin-right: 10px;
flex: none;
align-items: center;
justify-content: center;
img {
border: none;
max-width: 100%;
max-height: 100%;
}
}
&__content {
position: relative;
display: flex;
flex: 1;
height: 90px;
flex-direction: column;
min-width: 0; /* hack for flex box ellipsis */
&--centered {
justify-content: center;
}
}
&__title,
&__desc {
word-break: break-all;
}
&__title {
line-height: 16px;
max-height: 32px;
font-weight: bold;
.multi-ellipsis(2);
}
&__desc {
color: @gray-darker;
max-height: 20px;
line-height: 20px;
}
&__bottom {
line-height: 20px;
}
&__price {
display: inline-block;
color: @red;
font-weight: bold;
}
&__origin-price {
display: inline-block;
margin-left: 5px;
font-size: 10px;
color: @gray-darker;
text-decoration: line-through;
}
&__num {
float: right;
}
&__tag {
position: absolute;
top: 2px;
left: 0;
}
&__footer {
text-align: right;
flex: none;
.van-button {
margin-left: 5px;
}
}
}