mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[improvement] Badge: add less vars (#3131)
This commit is contained in:
parent
26543e89eb
commit
b4fc5df926
@ -1,5 +1,5 @@
|
|||||||
@import '../style/var';
|
@import '../style/var';
|
||||||
|
|
||||||
.badge-group {
|
.badge-group {
|
||||||
width: 85px;
|
width: @badge-group-width;
|
||||||
}
|
}
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
.van-badge {
|
.van-badge {
|
||||||
display: block;
|
display: block;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
font-size: 14px;
|
|
||||||
line-height: 1.4;
|
|
||||||
user-select: none;
|
user-select: none;
|
||||||
color: @gray-darker;
|
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 20px 12px 20px 9px;
|
color: @badge-text-color;
|
||||||
background-color: @background-color;
|
padding: @badge-padding;
|
||||||
|
font-size: @badge-font-size;
|
||||||
|
line-height: @badge-line-height;
|
||||||
|
background-color: @badge-background-color;
|
||||||
border-left: 3px solid transparent;
|
border-left: 3px solid transparent;
|
||||||
|
|
||||||
&__text {
|
&__text {
|
||||||
@ -18,7 +18,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
background-color: @active-color;
|
background-color: @badge-active-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(:last-child)::after {
|
&:not(:last-child)::after {
|
||||||
@ -26,9 +26,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&--select {
|
&--select {
|
||||||
font-weight: 500;
|
color: @badge-selected-text-color;
|
||||||
color: @text-color;
|
font-weight: @badge-selected-font-weight;
|
||||||
border-color: @red;
|
border-color: @badge-selected-border-color;
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
border-right-width: 1px;
|
border-right-width: 1px;
|
||||||
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
&,
|
&,
|
||||||
&:active {
|
&:active {
|
||||||
background-color: @white;
|
background-color: @badge-selected-background-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,6 +32,21 @@
|
|||||||
@action-sheet-close-icon-size: 18px;
|
@action-sheet-close-icon-size: 18px;
|
||||||
@action-sheet-close-icon-color: @gray-dark;
|
@action-sheet-close-icon-color: @gray-dark;
|
||||||
|
|
||||||
|
// Badge
|
||||||
|
@badge-font-size: 14px;
|
||||||
|
@badge-line-height: 1.4;
|
||||||
|
@badge-text-color: @gray-darker;
|
||||||
|
@badge-padding: 20px 12px 20px 9px;
|
||||||
|
@badge-active-color: @active-color;
|
||||||
|
@badge-background-color: @background-color;
|
||||||
|
@badge-selected-font-weight: 500;
|
||||||
|
@badge-selected-text-color: @text-color;
|
||||||
|
@badge-selected-border-color: @red;
|
||||||
|
@badge-selected-background-color: @white;
|
||||||
|
|
||||||
|
// BadgeGroup
|
||||||
|
@badge-group-width: 85px;
|
||||||
|
|
||||||
// Button
|
// Button
|
||||||
@button-mini-height: 22px;
|
@button-mini-height: 22px;
|
||||||
@button-mini-min-width: 50px;
|
@button-mini-min-width: 50px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user