mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-25 02:41:46 +08:00
[improvement] Card: add less vars (#3167)
This commit is contained in:
parent
ce4e0cc3e9
commit
b5f7e55716
packages
@ -3,11 +3,11 @@
|
||||
|
||||
.van-card {
|
||||
position: relative;
|
||||
color: @text-color;
|
||||
font-size: 12px;
|
||||
padding: 5px 15px;
|
||||
color: @card-text-color;
|
||||
padding: @card-padding;
|
||||
font-size: @card-font-size;
|
||||
box-sizing: border-box;
|
||||
background-color: @background-color-light;
|
||||
background-color: @card-background-color;
|
||||
|
||||
&:not(:first-child) {
|
||||
margin-top: 10px;
|
||||
@ -19,8 +19,8 @@
|
||||
|
||||
&__thumb {
|
||||
position: relative;
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
width: @card-thumb-size;
|
||||
height: @card-thumb-size;
|
||||
margin-right: 10px;
|
||||
flex: none;
|
||||
align-items: center;
|
||||
@ -37,7 +37,7 @@
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
height: 90px;
|
||||
height: @card-thumb-size;
|
||||
flex-direction: column;
|
||||
min-width: 0; /* hack for flex box ellipsis */
|
||||
|
||||
@ -52,17 +52,17 @@
|
||||
}
|
||||
|
||||
&__title {
|
||||
line-height: 16px;
|
||||
line-height: @card-title-line-height;
|
||||
max-height: 32px;
|
||||
font-weight: bold;
|
||||
font-weight: 500;
|
||||
|
||||
.multi-ellipsis(2);
|
||||
}
|
||||
|
||||
&__desc {
|
||||
color: @gray-darker;
|
||||
max-height: 20px;
|
||||
line-height: 20px;
|
||||
color: @card-desc-color;
|
||||
max-height: @card-desc-line-height;
|
||||
line-height: @card-desc-line-height;
|
||||
}
|
||||
|
||||
&__bottom {
|
||||
@ -71,15 +71,15 @@
|
||||
|
||||
&__price {
|
||||
display: inline-block;
|
||||
color: @red;
|
||||
font-weight: bold;
|
||||
color: @card-price-color;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
&__origin-price {
|
||||
display: inline-block;
|
||||
margin-left: 5px;
|
||||
font-size: 10px;
|
||||
color: @gray-darker;
|
||||
color: @card-origin-price-color;
|
||||
font-size: @card-origin-price-font-size;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
|
@ -87,6 +87,19 @@
|
||||
@button-plain-background-color: @white;
|
||||
@button-disabled-opacity: .5;
|
||||
|
||||
// Card
|
||||
@card-padding: 5px 15px;
|
||||
@card-font-size: 12px;
|
||||
@card-text-color: @text-color;
|
||||
@card-background-color: @background-color-light;
|
||||
@card-thumb-size: 90px;
|
||||
@card-title-line-height: 16px;
|
||||
@card-desc-color: @gray-darker;
|
||||
@card-desc-line-height: 20px;
|
||||
@card-price-color: @red;
|
||||
@card-origin-price-color: @gray-darker;
|
||||
@card-origin-price-font-size: 10px;
|
||||
|
||||
// Cell
|
||||
@cell-font-size: 14px;
|
||||
@cell-line-height: 24px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user