style: decentralized less var (#8369)

* style: decentralized less var

* chore: remove emtpy var file
This commit is contained in:
neverland 2021-03-17 16:14:18 +08:00 committed by GitHub
parent 3b645362d8
commit b3146b9108
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
157 changed files with 997 additions and 1002 deletions

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-action-bar-button {
flex: 1;

View File

@ -0,0 +1,5 @@
@import '../style/var.less';
@action-bar-button-height: 40px;
@action-bar-button-warning-color: @gradient-orange;
@action-bar-button-danger-color: @gradient-red;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-action-bar-icon {
display: flex;

View File

@ -0,0 +1,9 @@
@import '../style/var.less';
@action-bar-icon-width: 48px;
@action-bar-icon-height: 100%;
@action-bar-icon-color: @text-color;
@action-bar-icon-size: 18px;
@action-bar-icon-font-size: @font-size-xs;
@action-bar-icon-active-color: @active-color;
@action-bar-icon-text-color: @gray-7;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
@import '../style/mixins/safe-area.less';
.van-action-bar {

4
src/action-bar/var.less Normal file
View File

@ -0,0 +1,4 @@
@import '../style/var.less';
@action-bar-background-color: @white;
@action-bar-height: 50px;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
@import '../style/mixins/hairline';
.van-action-sheet {
@ -87,7 +87,7 @@
text-align: center;
&::after {
.hairline-bottom(@cell-border-color, @padding-md, @padding-md);
.hairline-bottom(@border-color, @padding-md, @padding-md);
}
}

24
src/action-sheet/var.less Normal file
View File

@ -0,0 +1,24 @@
@import '../style/var.less';
@action-sheet-max-height: 80%;
@action-sheet-header-height: 48px;
@action-sheet-header-font-size: @font-size-lg;
@action-sheet-description-color: @gray-6;
@action-sheet-description-font-size: @font-size-md;
@action-sheet-description-line-height: @line-height-md;
@action-sheet-item-background: @white;
@action-sheet-item-font-size: @font-size-lg;
@action-sheet-item-line-height: @line-height-lg;
@action-sheet-item-text-color: @text-color;
@action-sheet-item-disabled-text-color: @gray-5;
@action-sheet-subname-color: @gray-6;
@action-sheet-subname-font-size: @font-size-sm;
@action-sheet-subname-line-height: @line-height-sm;
@action-sheet-close-icon-size: 22px;
@action-sheet-close-icon-color: @gray-5;
@action-sheet-close-icon-active-color: @gray-6;
@action-sheet-close-icon-padding: 0 @padding-md;
@action-sheet-cancel-text-color: @gray-7;
@action-sheet-cancel-padding-top: @padding-xs;
@action-sheet-cancel-padding-color: @background-color;
@action-sheet-loading-icon-size: 22px;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-address-edit {
padding: @address-edit-padding;

View File

@ -0,0 +1,7 @@
@import '../style/var.less';
@address-edit-padding: @padding-sm;
@address-edit-buttons-padding: @padding-xl @padding-base;
@address-edit-button-margin-bottom: @padding-sm;
@address-edit-detail-finish-color: @blue;
@address-edit-detail-finish-font-size: @font-size-sm;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
@import '../style/mixins/safe-area.less';
.van-address-list {

15
src/address-list/var.less Normal file
View File

@ -0,0 +1,15 @@
@import '../style/var.less';
@address-list-padding: @padding-sm @padding-sm 80px;
@address-list-disabled-text-color: @gray-6;
@address-list-disabled-text-padding: @padding-base * 5 0 @padding-md;
@address-list-disabled-text-font-size: @font-size-md;
@address-list-disabled-text-line-height: @line-height-md;
@address-list-add-button-z-index: 999;
@address-list-item-padding: @padding-sm;
@address-list-item-text-color: @text-color;
@address-list-item-disabled-text-color: @gray-5;
@address-list-item-font-size: 13px;
@address-list-item-line-height: @line-height-sm;
@address-list-item-radio-icon-color: @red;
@address-list-edit-icon-size: 20px;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-badge {
display: inline-block;

12
src/badge/var.less Normal file
View File

@ -0,0 +1,12 @@
@import '../style/var.less';
@badge-size: 16px;
@badge-color: @white;
@badge-padding: 0 3px;
@badge-font-size: @font-size-sm;
@badge-font-weight: @font-weight-bold;
@badge-border-width: @border-width-base;
@badge-background-color: @red;
@badge-dot-color: @red;
@badge-dot-size: 8px;
@badge-font-family: -apple-system-font, Helvetica Neue, Arial, sans-serif;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-button {
position: relative;

36
src/button/var.less Normal file
View File

@ -0,0 +1,36 @@
@import '../style/var.less';
@button-mini-height: 24px;
@button-mini-padding: 0 @padding-base;
@button-mini-font-size: @font-size-xs;
@button-small-height: 32px;
@button-small-padding: 0 @padding-xs;
@button-small-font-size: @font-size-sm;
@button-normal-padding: 0 15px;
@button-normal-font-size: @font-size-md;
@button-large-height: 50px;
@button-default-height: 44px;
@button-default-line-height: 1.2;
@button-default-font-size: @font-size-lg;
@button-default-color: @text-color;
@button-default-background-color: @white;
@button-default-border-color: @border-color;
@button-primary-color: @white;
@button-primary-background-color: @blue;
@button-primary-border-color: @blue;
@button-success-color: @white;
@button-success-background-color: @green;
@button-success-border-color: @green;
@button-danger-color: @white;
@button-danger-background-color: @red;
@button-danger-border-color: @red;
@button-warning-color: @white;
@button-warning-background-color: @orange;
@button-warning-border-color: @orange;
@button-border-width: @border-width-base;
@button-border-radius: @border-radius-sm;
@button-round-border-radius: @border-radius-max;
@button-plain-background-color: @white;
@button-disabled-opacity: @disabled-opacity;
@button-icon-size: 1.2em;
@button-loading-icon-size: 20px;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
@import '../style/mixins/safe-area.less';
.van-calendar {

27
src/calendar/var.less Normal file
View File

@ -0,0 +1,27 @@
@import '../style/var.less';
@calendar-background-color: @white;
@calendar-popup-height: 80%;
@calendar-header-box-shadow: 0 2px 10px rgba(125, 126, 128, 0.16);
@calendar-header-title-height: 44px;
@calendar-header-title-font-size: @font-size-lg;
@calendar-header-subtitle-font-size: @font-size-md;
@calendar-weekdays-height: 30px;
@calendar-weekdays-font-size: @font-size-sm;
@calendar-month-title-font-size: @font-size-md;
@calendar-month-mark-color: fade(@gray-2, 80%);
@calendar-month-mark-font-size: 160px;
@calendar-day-height: 64px;
@calendar-day-font-size: @font-size-lg;
@calendar-range-edge-color: @white;
@calendar-range-edge-background-color: @red;
@calendar-range-middle-color: @red;
@calendar-range-middle-background-opacity: 0.1;
@calendar-selected-day-size: 54px;
@calendar-selected-day-color: @white;
@calendar-info-font-size: @font-size-xs;
@calendar-info-line-height: @line-height-xs;
@calendar-selected-day-background-color: @red;
@calendar-day-disabled-color: @gray-5;
@calendar-confirm-button-height: 36px;
@calendar-confirm-button-margin: 7px 0;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-card {
position: relative;

18
src/card/var.less Normal file
View File

@ -0,0 +1,18 @@
@import '../style/var.less';
@card-padding: @padding-xs @padding-md;
@card-font-size: @font-size-sm;
@card-text-color: @text-color;
@card-background-color: @background-color-light;
@card-thumb-size: 88px;
@card-thumb-border-radius: @border-radius-lg;
@card-title-line-height: 16px;
@card-desc-color: @gray-7;
@card-desc-line-height: @line-height-md;
@card-price-color: @gray-8;
@card-origin-price-color: @gray-6;
@card-num-color: @gray-6;
@card-origin-price-font-size: @font-size-xs;
@card-price-font-size: @font-size-sm;
@card-price-integer-font-size: @font-size-lg;
@card-price-font-family: @price-integer-font-family;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-cascader {
&__header {

14
src/cascader/var.less Normal file
View File

@ -0,0 +1,14 @@
@import '../style/var.less';
@cascader-header-height: 48px;
@cascader-title-font-size: @font-size-lg;
@cascader-title-line-height: 20px;
@cascader-close-icon-size: 22px;
@cascader-close-icon-color: @gray-5;
@cascader-close-icon-active-color: @gray-6;
@cascader-selected-icon-size: 18px;
@cascader-tabs-height: 48px;
@cascader-active-color: @red;
@cascader-options-height: 384px;
@cascader-tab-color: @text-color;
@cascader-unselected-tab-color: @gray-6;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-cell-group {
background-color: @cell-group-background-color;

7
src/cell-group/var.less Normal file
View File

@ -0,0 +1,7 @@
@import '../style/var.less';
@cell-group-background-color: @white;
@cell-group-title-color: @gray-6;
@cell-group-title-padding: @padding-md @padding-md @padding-xs;
@cell-group-title-font-size: @font-size-md;
@cell-group-title-line-height: 16px;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
@import '../style/mixins/hairline';
.van-cell {

21
src/cell/var.less Normal file
View File

@ -0,0 +1,21 @@
@import '../style/var.less';
@cell-font-size: @font-size-md;
@cell-line-height: 24px;
@cell-vertical-padding: 10px;
@cell-horizontal-padding: @padding-md;
@cell-text-color: @text-color;
@cell-background-color: @white;
@cell-border-color: @border-color;
@cell-active-color: @active-color;
@cell-required-color: @red;
@cell-label-color: @gray-6;
@cell-label-font-size: @font-size-sm;
@cell-label-line-height: @line-height-sm;
@cell-label-margin-top: @padding-base;
@cell-value-color: @gray-6;
@cell-icon-size: 16px;
@cell-right-icon-color: @gray-6;
@cell-large-vertical-padding: @padding-sm;
@cell-large-title-font-size: @font-size-lg;
@cell-large-label-font-size: @font-size-md;

View File

@ -1,5 +1,3 @@
@import '../style/var.less';
.van-checkbox-group {
&--horizontal {
display: flex;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-checkbox {
display: flex;

11
src/checkbox/var.less Normal file
View File

@ -0,0 +1,11 @@
@import '../style/var.less';
@checkbox-size: 20px;
@checkbox-border-color: @gray-5;
@checkbox-transition-duration: @animation-duration-fast;
@checkbox-label-margin: @padding-xs;
@checkbox-label-color: @text-color;
@checkbox-checked-icon-color: @blue;
@checkbox-disabled-icon-color: @gray-5;
@checkbox-disabled-label-color: @gray-5;
@checkbox-disabled-background-color: @border-color;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-circle {
position: relative;

9
src/circle/var.less Normal file
View File

@ -0,0 +1,9 @@
@import '../style/var.less';
@circle-size: 100px;
@circle-color: @blue;
@circle-layer-color: @white;
@circle-text-color: @text-color;
@circle-text-font-weight: @font-weight-bold;
@circle-text-font-size: @font-size-md;
@circle-text-line-height: @line-height-md;

View File

@ -1,5 +1,3 @@
@import '../style/var.less';
.van-col {
display: block;
box-sizing: border-box;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
@import '../style/mixins/hairline';
.van-collapse-item {
@ -6,7 +6,7 @@
&--border {
&::after {
.hairline-top(@cell-border-color, @padding-md, @padding-md);
.hairline-top(@border-color, @padding-md, @padding-md);
}
}

View File

@ -0,0 +1,9 @@
@import '../style/var.less';
@collapse-item-transition-duration: @animation-duration-base;
@collapse-item-content-padding: @padding-sm @padding-md;
@collapse-item-content-font-size: @font-size-md;
@collapse-item-content-line-height: 1.5;
@collapse-item-content-text-color: @gray-6;
@collapse-item-content-background-color: @white;
@collapse-item-title-disabled-color: @gray-5;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-contact-card {
padding: @contact-card-padding;

View File

@ -0,0 +1,6 @@
@import '../style/var.less';
@contact-card-padding: @padding-md;
@contact-card-add-icon-size: 40px;
@contact-card-add-icon-color: @blue;
@contact-card-value-line-height: @line-height-md;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-contact-edit {
padding: @contact-edit-padding;

View File

@ -0,0 +1,8 @@
@import '../style/var.less';
@contact-edit-padding: @padding-md;
@contact-edit-fields-radius: @border-radius-md;
@contact-edit-buttons-padding: @padding-xl 0;
@contact-edit-button-margin-bottom: @padding-sm;
@contact-edit-button-font-size: 16px;
@contact-edit-field-label-width: 4.1em;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
@import '../style/mixins/safe-area.less';
.van-contact-list {

View File

@ -0,0 +1,6 @@
@import '../style/var.less';
@contact-list-edit-icon-size: 16px;
@contact-list-add-button-z-index: 999;
@contact-list-item-padding: @padding-md;
@contact-list-item-radio-icon-color: @red;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-count-down {
color: @count-down-text-color;

5
src/count-down/var.less Normal file
View File

@ -0,0 +1,5 @@
@import '../style/var.less';
@count-down-text-color: @text-color;
@count-down-font-size: @font-size-md;
@count-down-line-height: @line-height-md;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-coupon-cell {
&__value--selected {

3
src/coupon-cell/var.less Normal file
View File

@ -0,0 +1,3 @@
@import '../style/var.less';
@coupon-cell-selected-text-color: @text-color;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-coupon-list {
position: relative;

10
src/coupon-list/var.less Normal file
View File

@ -0,0 +1,10 @@
@import '../style/var.less';
@coupon-list-background-color: @background-color;
@coupon-list-field-padding: 5px 0 5px @padding-md;
@coupon-list-exchange-button-height: 32px;
@coupon-list-close-button-height: 40px;
@coupon-list-empty-image-size: 200px;
@coupon-list-empty-tip-color: @gray-6;
@coupon-list-empty-tip-font-size: @font-size-md;
@coupon-list-empty-tip-line-height: @line-height-md;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
@import '../style/mixins/ellipsis';
.van-coupon {

18
src/coupon/var.less Normal file
View File

@ -0,0 +1,18 @@
@import '../style/var.less';
@coupon-margin: 0 @padding-sm @padding-sm;
@coupon-content-height: 84px;
@coupon-content-padding: 14px 0;
@coupon-background-color: @white;
@coupon-active-background-color: @active-color;
@coupon-border-radius: @border-radius-lg;
@coupon-box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
@coupon-head-width: 96px;
@coupon-amount-color: @red;
@coupon-amount-font-size: 30px;
@coupon-currency-font-size: 40%;
@coupon-name-font-size: @font-size-md;
@coupon-disabled-text-color: @gray-6;
@coupon-description-padding: @padding-xs @padding-md;
@coupon-description-border-color: @border-color;
@coupon-corner-checkbox-icon-color: @red;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-dialog {
top: 45%;

21
src/dialog/var.less Normal file
View File

@ -0,0 +1,21 @@
@import '../style/var.less';
@dialog-width: 320px;
@dialog-small-screen-width: 90%;
@dialog-font-size: @font-size-lg;
@dialog-transition: @animation-duration-base;
@dialog-border-radius: 16px;
@dialog-background-color: @white;
@dialog-header-font-weight: @font-weight-bold;
@dialog-header-line-height: 24px;
@dialog-header-padding-top: 26px;
@dialog-header-isolated-padding: @padding-lg 0;
@dialog-message-padding: @padding-lg;
@dialog-message-font-size: @font-size-md;
@dialog-message-line-height: @line-height-md;
@dialog-message-max-height: 60vh;
@dialog-has-title-message-text-color: @gray-7;
@dialog-has-title-message-padding-top: @padding-xs;
@dialog-button-height: 48px;
@dialog-round-button-height: 36px;
@dialog-confirm-button-text-color: @red;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-divider {
display: flex;

10
src/divider/var.less Normal file
View File

@ -0,0 +1,10 @@
@import '../style/var.less';
@divider-margin: @padding-md 0;
@divider-text-color: @gray-6;
@divider-font-size: @font-size-md;
@divider-line-height: 24px;
@divider-border-color: @border-color;
@divider-content-padding: @padding-md;
@divider-content-left-width: 10%;
@divider-content-right-width: 10%;

View File

@ -1,4 +1,5 @@
@import '../style/var.less';
@import './var.less';
@import '../dropdown-menu/var.less';
.van-dropdown-item {
position: fixed;

View File

@ -0,0 +1,3 @@
@import '../style/var.less';
@dropdown-item-z-index: 10;

View File

@ -1,4 +1,5 @@
@import '../style/var.less';
@import './var.less';
@import '../dropdown-item/var.less';
.van-dropdown-menu {
user-select: none;

View File

@ -0,0 +1,13 @@
@import '../style/var.less';
@dropdown-menu-height: 48px;
@dropdown-menu-background-color: @white;
@dropdown-menu-box-shadow: 0 2px 12px fade(@gray-7, 12);
@dropdown-menu-title-font-size: 15px;
@dropdown-menu-title-text-color: @text-color;
@dropdown-menu-title-active-text-color: @red;
@dropdown-menu-title-disabled-text-color: @gray-6;
@dropdown-menu-title-padding: 0 @padding-xs;
@dropdown-menu-title-line-height: @line-height-lg;
@dropdown-menu-option-active-color: @red;
@dropdown-menu-content-max-height: 80%;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-empty {
display: flex;

10
src/empty/var.less Normal file
View File

@ -0,0 +1,10 @@
@import '../style/var.less';
@empty-padding: @padding-xl 0;
@empty-image-size: 160px;
@empty-description-margin-top: @padding-md;
@empty-description-padding: 0 60px;
@empty-description-color: @gray-6;
@empty-description-font-size: @font-size-md;
@empty-description-line-height: @line-height-md;
@empty-bottom-margin-top: 24px;

View File

@ -1,4 +1,5 @@
@import '../style/var.less';
@import './var.less';
@import '../cell/var.less';
.van-field {
&__label {

20
src/field/var.less Normal file
View File

@ -0,0 +1,20 @@
@import '../style/var.less';
@field-label-width: 6.2em;
@field-label-color: @gray-7;
@field-label-margin-right: @padding-sm;
@field-input-text-color: @text-color;
@field-input-error-text-color: @red;
@field-input-disabled-text-color: @gray-5;
@field-placeholder-text-color: @gray-5;
@field-icon-size: 16px;
@field-clear-icon-size: 16px;
@field-clear-icon-color: @gray-5;
@field-right-icon-color: @gray-6;
@field-error-message-color: @red;
@field-error-message-text-color: 12px;
@field-text-area-min-height: 60px;
@field-word-limit-color: @gray-7;
@field-word-limit-font-size: @font-size-sm;
@field-word-limit-line-height: 16px;
@field-disabled-text-color: @gray-5;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-grid-item {
position: relative;

8
src/grid-item/var.less Normal file
View File

@ -0,0 +1,8 @@
@import '../style/var.less';
@grid-item-content-padding: @padding-md @padding-xs;
@grid-item-content-background-color: @white;
@grid-item-content-active-color: @active-color;
@grid-item-icon-size: 28px;
@grid-item-text-color: @gray-7;
@grid-item-text-font-size: @font-size-sm;

View File

@ -1,5 +1,3 @@
@import '../style/var.less';
.van-grid {
display: flex;
flex-wrap: wrap;

View File

@ -1,4 +1,3 @@
@import '../style/var.less';
@import '~@vant/icons/src/encode-woff2.less';
.van-icon {

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-image-preview {
position: fixed;

View File

@ -0,0 +1,12 @@
@import '../style/var.less';
@image-preview-index-text-color: @white;
@image-preview-index-font-size: @font-size-md;
@image-preview-index-line-height: @line-height-md;
@image-preview-index-text-shadow: 0 1px 1px @gray-8;
@image-preview-overlay-background-color: rgba(0, 0, 0, 0.9);
@image-preview-close-icon-size: 22px;
@image-preview-close-icon-color: @gray-5;
@image-preview-close-icon-active-color: @gray-6;
@image-preview-close-icon-margin: @padding-md;
@image-preview-close-icon-z-index: 1;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-image {
position: relative;

9
src/image/var.less Normal file
View File

@ -0,0 +1,9 @@
@import '../style/var.less';
@image-placeholder-text-color: @gray-6;
@image-placeholder-font-size: @font-size-md;
@image-placeholder-background-color: @background-color;
@image-loading-icon-size: 32px;
@image-loading-icon-color: @gray-4;
@image-error-icon-size: 32px;
@image-error-icon-color: @gray-4;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-index-anchor {
z-index: @index-anchor-z-index;

11
src/index-anchor/var.less Normal file
View File

@ -0,0 +1,11 @@
@import '../style/var.less';
@index-anchor-z-index: 1;
@index-anchor-padding: 0 @padding-md;
@index-anchor-text-color: @text-color;
@index-anchor-font-weight: @font-weight-bold;
@index-anchor-font-size: @font-size-md;
@index-anchor-line-height: 32px;
@index-anchor-background-color: transparent;
@index-anchor-sticky-text-color: @red;
@index-anchor-sticky-background-color: @white;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-index-bar {
&__sidebar {

6
src/index-bar/var.less Normal file
View File

@ -0,0 +1,6 @@
@import '../style/var.less';
@index-bar-sidebar-z-index: 2;
@index-bar-index-font-size: @font-size-xs;
@index-bar-index-line-height: @line-height-xs;
@index-bar-index-active-color: @red;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-list {
&__loading,

7
src/list/var.less Normal file
View File

@ -0,0 +1,7 @@
@import '../style/var.less';
@list-icon-margin-right: @padding-base;
@list-text-color: @gray-6;
@list-text-font-size: @font-size-md;
@list-text-line-height: 50px;
@list-loading-icon-size: 16px;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-loading {
position: relative;

7
src/loading/var.less Normal file
View File

@ -0,0 +1,7 @@
@import '../style/var.less';
@loading-text-color: @gray-6;
@loading-text-font-size: @font-size-md;
@loading-spinner-color: @gray-5;
@loading-spinner-size: 30px;
@loading-spinner-animation-duration: 0.8s;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-nav-bar {
position: relative;

10
src/nav-bar/var.less Normal file
View File

@ -0,0 +1,10 @@
@import '../style/var.less';
@nav-bar-height: 46px;
@nav-bar-background-color: @white;
@nav-bar-arrow-size: 16px;
@nav-bar-icon-color: @blue;
@nav-bar-text-color: @blue;
@nav-bar-title-font-size: @font-size-lg;
@nav-bar-title-text-color: @text-color;
@nav-bar-z-index: 1;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-notice-bar {
position: relative;

11
src/notice-bar/var.less Normal file
View File

@ -0,0 +1,11 @@
@import '../style/var.less';
@notice-bar-height: 40px;
@notice-bar-padding: 0 @padding-md;
@notice-bar-wrapable-padding: @padding-xs @padding-md;
@notice-bar-text-color: @orange-dark;
@notice-bar-font-size: @font-size-md;
@notice-bar-line-height: 24px;
@notice-bar-background-color: @orange-light;
@notice-bar-icon-size: 16px;
@notice-bar-icon-min-width: 24px;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-notify {
display: flex;

10
src/notify/var.less Normal file
View File

@ -0,0 +1,10 @@
@import '../style/var.less';
@notify-text-color: @white;
@notify-padding: @padding-xs @padding-md;
@notify-font-size: @font-size-md;
@notify-line-height: @line-height-md;
@notify-primary-background-color: @blue;
@notify-success-background-color: @green;
@notify-danger-background-color: @red;
@notify-warning-background-color: @orange;

View File

@ -202,23 +202,19 @@ export default {
How to use: [Custom Theme](#/en-US/theme).
| Name | Default Value | Description |
| --- | --- | --- |
| @number-keyboard-background-color | `@gray-2` | - |
| @number-keyboard-key-height | `48px` | - |
| @number-keyboard-key-font-size | `28px` | - |
| @number-keyboard-key-active-color | `@gray-3` | - |
| @number-keyboard-delete-font-size | `@font-size-lg` | - |
| @number-keyboard-title-color | `@gray-7` | - |
| @number-keyboard-title-height | `34px` | - |
| @number-keyboard-title-font-size | `@font-size-lg` | - |
| @number-keyboard-close-padding | `0 @padding-md` | - |
| @number-keyboard-close-color | `@text-link-color` | - |
| @number-keyboard-close-font-size | `@font-size-md` | - |
| @number-keyboard-button-text-color | `@white` | - |
| @number-keyboard-button-background-color | `@blue` | - |
| @number-keyboard-cursor-color | `@text-color` | - |
| @number-keyboard-cursor-width | `1px` | - |
| @number-keyboard-cursor-height | `40%` | - |
| @number-keyboard-cursor-animation-duration | `1s` | - |
| @number-keyboard-z-index | `100` | - |
| Name | Default Value | Description |
| ---------------------------------------- | ------------------ | ----------- |
| @number-keyboard-background-color | `@gray-2` | - |
| @number-keyboard-key-height | `48px` | - |
| @number-keyboard-key-font-size | `28px` | - |
| @number-keyboard-key-active-color | `@gray-3` | - |
| @number-keyboard-delete-font-size | `@font-size-lg` | - |
| @number-keyboard-title-color | `@gray-7` | - |
| @number-keyboard-title-height | `34px` | - |
| @number-keyboard-title-font-size | `@font-size-lg` | - |
| @number-keyboard-close-padding | `0 @padding-md` | - |
| @number-keyboard-close-color | `@text-link-color` | - |
| @number-keyboard-close-font-size | `@font-size-md` | - |
| @number-keyboard-button-text-color | `@white` | - |
| @number-keyboard-button-background-color | `@blue` | - |
| @number-keyboard-z-index | `100` | - |

View File

@ -213,26 +213,22 @@ export default {
组件提供了下列 Less 变量,可用于自定义样式,使用方法请参考[主题定制](#/zh-CN/theme)。
| 名称 | 默认值 | 描述 |
| ------------------------------------------ | ------------------ | ---- |
| @number-keyboard-background-color | `@gray-2` | - |
| @number-keyboard-key-height | `48px` | - |
| @number-keyboard-key-font-size | `28px` | - |
| @number-keyboard-key-active-color | `@gray-3` | - |
| @number-keyboard-delete-font-size | `@font-size-lg` | - |
| @number-keyboard-title-color | `@gray-7` | - |
| @number-keyboard-title-height | `34px` | - |
| @number-keyboard-title-font-size | `@font-size-lg` | - |
| @number-keyboard-close-padding | `0 @padding-md` | - |
| @number-keyboard-close-color | `@text-link-color` | - |
| @number-keyboard-close-font-size | `@font-size-md` | - |
| @number-keyboard-button-text-color | `@white` | - |
| @number-keyboard-button-background-color | `@blue` | - |
| @number-keyboard-cursor-color | `@text-color` | - |
| @number-keyboard-cursor-width | `1px` | - |
| @number-keyboard-cursor-height | `40%` | - |
| @number-keyboard-cursor-animation-duration | `1s` | - |
| @number-keyboard-z-index | `100` | - |
| 名称 | 默认值 | 描述 |
| ---------------------------------------- | ------------------ | ---- |
| @number-keyboard-background-color | `@gray-2` | - |
| @number-keyboard-key-height | `48px` | - |
| @number-keyboard-key-font-size | `28px` | - |
| @number-keyboard-key-active-color | `@gray-3` | - |
| @number-keyboard-delete-font-size | `@font-size-lg` | - |
| @number-keyboard-title-color | `@gray-7` | - |
| @number-keyboard-title-height | `34px` | - |
| @number-keyboard-title-font-size | `@font-size-lg` | - |
| @number-keyboard-close-padding | `0 @padding-md` | - |
| @number-keyboard-close-color | `@text-link-color` | - |
| @number-keyboard-close-font-size | `@font-size-md` | - |
| @number-keyboard-button-text-color | `@white` | - |
| @number-keyboard-button-background-color | `@blue` | - |
| @number-keyboard-z-index | `100` | - |
## 常见问题

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-number-keyboard {
position: fixed;

View File

@ -0,0 +1,16 @@
@import '../style/var.less';
@number-keyboard-background-color: @gray-2;
@number-keyboard-key-height: 48px;
@number-keyboard-key-font-size: 28px;
@number-keyboard-key-active-color: @gray-3;
@number-keyboard-delete-font-size: @font-size-lg;
@number-keyboard-title-color: @gray-7;
@number-keyboard-title-height: 34px;
@number-keyboard-title-font-size: @font-size-lg;
@number-keyboard-close-padding: 0 @padding-md;
@number-keyboard-close-color: @text-link-color;
@number-keyboard-close-font-size: @font-size-md;
@number-keyboard-button-text-color: @white;
@number-keyboard-button-background-color: @blue;
@number-keyboard-z-index: 100;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-overlay {
position: fixed;

4
src/overlay/var.less Normal file
View File

@ -0,0 +1,4 @@
@import '../style/var.less';
@overlay-z-index: 1;
@overlay-background-color: rgba(0, 0, 0, 0.7);

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-pagination {
display: flex;

11
src/pagination/var.less Normal file
View File

@ -0,0 +1,11 @@
@import '../style/var.less';
@pagination-height: 40px;
@pagination-font-size: @font-size-md;
@pagination-item-width: 36px;
@pagination-item-default-color: @blue;
@pagination-item-disabled-color: @gray-7;
@pagination-item-disabled-background-color: @background-color;
@pagination-background-color: @white;
@pagination-desc-color: @gray-7;
@pagination-disabled-opacity: @disabled-opacity;

View File

@ -150,15 +150,19 @@ export default {
How to use: [Custom Theme](#/en-US/theme).
| Name | Default Value | Description |
| -------------------------------- | --------------- | ----------- |
| @password-input-height | `50px` | - |
| @password-input-margin | `0 @padding-md` | - |
| @password-input-font-size | `20px` | - |
| @password-input-border-radius | `6px` | - |
| @password-input-background-color | `@white` | - |
| @password-input-info-color | `@gray-6` | - |
| @password-input-info-font-size | `@font-size-md` | - |
| @password-input-error-info-color | `@red` | - |
| @password-input-dot-size | `10px` | - |
| @password-input-dot-color | `@black` | - |
| Name | Default Value | Description |
| ----------------------------------------- | --------------- | ----------- |
| @password-input-height | `50px` | - |
| @password-input-margin | `0 @padding-md` | - |
| @password-input-font-size | `20px` | - |
| @password-input-border-radius | `6px` | - |
| @password-input-background-color | `@white` | - |
| @password-input-info-color | `@gray-6` | - |
| @password-input-info-font-size | `@font-size-md` | - |
| @password-input-error-info-color | `@red` | - |
| @password-input-dot-size | `10px` | - |
| @password-input-dot-color | `@black` | - |
| @password-input-cursor-color | `@text-color` | - |
| @password-input-cursor-width | `1px` | - |
| @password-input-cursor-height | `40%` | - |
| @password-input-cursor-animation-duration | `1s` | - |

View File

@ -160,15 +160,19 @@ export default {
组件提供了下列 Less 变量,可用于自定义样式,使用方法请参考[主题定制](#/zh-CN/theme)。
| 名称 | 默认值 | 描述 |
| -------------------------------- | --------------- | ---- |
| @password-input-height | `50px` | - |
| @password-input-margin | `0 @padding-md` | - |
| @password-input-font-size | `20px` | - |
| @password-input-border-radius | `6px` | - |
| @password-input-background-color | `@white` | - |
| @password-input-info-color | `@gray-6` | - |
| @password-input-info-font-size | `@font-size-md` | - |
| @password-input-error-info-color | `@red` | - |
| @password-input-dot-size | `10px` | - |
| @password-input-dot-color | `@black` | - |
| 名称 | 默认值 | 描述 |
| ----------------------------------------- | --------------- | ---- |
| @password-input-height | `50px` | - |
| @password-input-margin | `0 @padding-md` | - |
| @password-input-font-size | `20px` | - |
| @password-input-border-radius | `6px` | - |
| @password-input-background-color | `@white` | - |
| @password-input-info-color | `@gray-6` | - |
| @password-input-info-font-size | `@font-size-md` | - |
| @password-input-error-info-color | `@red` | - |
| @password-input-dot-size | `10px` | - |
| @password-input-dot-color | `@black` | - |
| @password-input-cursor-color | `@text-color` | - |
| @password-input-cursor-width | `1px` | - |
| @password-input-cursor-height | `40%` | - |
| @password-input-cursor-animation-duration | `1s` | - |

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-password-input {
position: relative;
@ -59,11 +59,11 @@
position: absolute;
top: 50%;
left: 50%;
width: @number-keyboard-cursor-width;
height: @number-keyboard-cursor-height;
background-color: @number-keyboard-cursor-color;
width: @password-input-cursor-width;
height: @password-input-cursor-height;
background-color: @password-input-cursor-color;
transform: translate(-50%, -50%);
animation: @number-keyboard-cursor-animation-duration van-cursor-flicker
animation: @password-input-cursor-animation-duration van-cursor-flicker
infinite;
}
}

View File

@ -0,0 +1,16 @@
@import '../style/var.less';
@password-input-height: 50px;
@password-input-margin: 0 @padding-md;
@password-input-font-size: 20px;
@password-input-border-radius: 6px;
@password-input-background-color: @white;
@password-input-info-color: @gray-6;
@password-input-info-font-size: @font-size-md;
@password-input-error-info-color: @red;
@password-input-dot-size: 10px;
@password-input-dot-color: @black;
@password-input-cursor-color: @text-color;
@password-input-cursor-width: 1px;
@password-input-cursor-height: 40%;
@password-input-cursor-animation-duration: 1s;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-picker {
position: relative;

15
src/picker/var.less Normal file
View File

@ -0,0 +1,15 @@
@import '../style/var.less';
@picker-background-color: @white;
@picker-toolbar-height: 44px;
@picker-title-font-size: @font-size-lg;
@picker-title-line-height: @line-height-md;
@picker-action-padding: 0 @padding-md;
@picker-action-font-size: @font-size-md;
@picker-confirm-action-color: @text-link-color;
@picker-cancel-action-color: @gray-6;
@picker-option-font-size: @font-size-lg;
@picker-option-text-color: @black;
@picker-option-disabled-opacity: 0.3;
@picker-loading-icon-color: @blue;
@picker-loading-mask-color: rgba(255, 255, 255, 0.9);

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
.van-popover {
position: absolute;

15
src/popover/var.less Normal file
View File

@ -0,0 +1,15 @@
@import '../style/var.less';
@popover-arrow-size: 6px;
@popover-border-radius: @border-radius-lg;
@popover-action-width: 128px;
@popover-action-height: 44px;
@popover-action-font-size: @font-size-md;
@popover-action-line-height: @line-height-md;
@popover-action-icon-size: 20px;
@popover-light-text-color: @text-color;
@popover-light-background-color: @white;
@popover-light-action-disabled-text-color: @gray-5;
@popover-dark-text-color: @white;
@popover-dark-background-color: #4a4a4a;
@popover-dark-action-disabled-text-color: @gray-6;

View File

@ -1,4 +1,4 @@
@import '../style/var.less';
@import './var.less';
@import '../style/mixins/safe-area.less';
.van {

10
src/popup/var.less Normal file
View File

@ -0,0 +1,10 @@
@import '../style/var.less';
@popup-background-color: @white;
@popup-transition: transform @animation-duration-base;
@popup-round-border-radius: 16px;
@popup-close-icon-size: 22px;
@popup-close-icon-color: @gray-5;
@popup-close-icon-active-color: @gray-6;
@popup-close-icon-margin: 16px;
@popup-close-icon-z-index: 1;

Some files were not shown because too many files have changed in this diff Show More