[improvement] Actionsheet: add less vars (#3049)

This commit is contained in:
neverland 2019-03-24 21:03:47 +08:00 committed by GitHub
parent 76a90eb89e
commit 078ba99f94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 12 deletions

View File

@ -1,15 +1,15 @@
@import '../style/var';
.van-actionsheet {
max-height: 90%;
color: @text-color;
color: @action-sheet-item-text-color;
max-height: @action-sheet-max-height;
&__item,
&__cancel {
line-height: 50px;
font-size: 16px;
text-align: center;
background-color: @white;
font-size: @action-sheet-item-font-size;
line-height: @action-sheet-item-height;
background-color: @action-sheet-item-background;
&:active {
background-color: @active-color;
@ -17,7 +17,7 @@
}
&__item {
height: 50px;
height: @action-sheet-item-height;
}
&__item--disabled {
@ -29,8 +29,8 @@
}
&__subname {
font-size: 12px;
color: @gray-darker;
color: @action-sheet-subname-color;
font-size: @action-sheet-subname-font-size;
margin-left: 5px;
}
@ -46,8 +46,8 @@
}
&__header {
font-size: 16px;
line-height: 44px;
font-size: @action-sheet-header-font-size;
line-height: @action-sheet-header-height;
text-align: center;
}
@ -55,9 +55,9 @@
top: 0;
right: 0;
padding: 0 15px;
font-size: 18px;
color: @gray-dark;
position: absolute;
line-height: inherit;
color: @action-sheet-close-icon-color;
font-size: @action-sheet-close-icon-size;
}
}

View File

@ -19,6 +19,19 @@
@background-color: #f8f8f8;
@background-color-light: #fafafa;
// ActionSheet
@action-sheet-max-height: 90%;
@action-sheet-header-height: 44px;
@action-sheet-header-font-size: 16px;
@action-sheet-item-height: 50px;
@action-sheet-item-background: @white;
@action-sheet-item-font-size: 16px;
@action-sheet-item-text-color: @text-color;
@action-sheet-subname-color: @gray-darker;
@action-sheet-subname-font-size: 12px;
@action-sheet-close-icon-size: 18px;
@action-sheet-close-icon-color: @gray-dark;
// Button
@button-default-color: @text-color;
@button-default-background-color: @white;