chore: prettier all less files

This commit is contained in:
陈嘉涵 2020-01-19 17:15:54 +08:00
parent 1e864a445f
commit 08c84c9c38
21 changed files with 64 additions and 49 deletions

View File

@ -32,7 +32,7 @@
} }
&:active::before { &:active::before {
opacity: .1; opacity: 0.1;
} }
&--loading, &--loading,

View File

@ -1,5 +1,5 @@
@import '../style/var'; @import '../style/var';
@import "../style/mixins/hairline"; @import '../style/mixins/hairline';
.van-cell { .van-cell {
position: relative; position: relative;

View File

@ -28,7 +28,7 @@
width: 1.25em; width: 1.25em;
height: 1.25em; height: 1.25em;
color: transparent; color: transparent;
font-size: .8em; font-size: 0.8em;
line-height: inherit; line-height: inherit;
text-align: center; text-align: center;
border: 1px solid @checkbox-border-color; border: 1px solid @checkbox-border-color;

View File

@ -8,7 +8,13 @@
.generate-col(24); .generate-col(24);
.generate-col(@n, @i: 1) when (@i =< @n) { .generate-col(@n, @i: 1) when (@i =< @n) {
.van-col--@{i} { width: @i * 100% / 24; } .van-col--@{i} {
.van-col--offset-@{i} { margin-left: @i * 100% / 24; } width: @i * 100% / 24;
}
.van-col--offset-@{i} {
margin-left: @i * 100% / 24;
}
.generate-col(@n, (@i + 1)); .generate-col(@n, (@i + 1));
} }

View File

@ -29,7 +29,7 @@
&--hairline { &--hairline {
&::before, &::before,
&::after { &::after {
transform: scaleY(.5); transform: scaleY(0.5);
} }
} }

View File

@ -46,7 +46,7 @@
border: 3px solid; border: 3px solid;
border-color: transparent transparent currentColor currentColor; border-color: transparent transparent currentColor currentColor;
transform: rotate(-45deg); transform: rotate(-45deg);
opacity: .8; opacity: 0.8;
content: ''; content: '';
} }

View File

@ -56,14 +56,14 @@
} }
// for ios wechat // for ios wechat
&[type="date"], &[type='date'],
&[type="time"], &[type='time'],
&[type="datetime-local"] { &[type='datetime-local'] {
min-height: @cell-line-height; min-height: @cell-line-height;
} }
// for safari // for safari
&[type="search"] { &[type='search'] {
-webkit-appearance: none; -webkit-appearance: none;
} }
} }

View File

@ -69,9 +69,13 @@
* In case that some mobile browsers can continue animation when className changed * In case that some mobile browsers can continue animation when className changed
*/ */
@keyframes van-notice-bar-play { @keyframes van-notice-bar-play {
to { transform: translate3d(-100%, 0, 0); } to {
transform: translate3d(-100%, 0, 0);
}
} }
@keyframes van-notice-bar-play-infinite { @keyframes van-notice-bar-play-infinite {
to { transform: translate3d(-100%, 0, 0); } to {
transform: translate3d(-100%, 0, 0);
}
} }

View File

@ -46,9 +46,9 @@
left: 50%; left: 50%;
width: @password-input-dot-size; width: @password-input-dot-size;
height: @password-input-dot-size; height: @password-input-dot-size;
margin: -(@password-input-dot-size / 2) 0 0 -(@password-input-dot-size / 2);
background-color: @password-input-dot-color; background-color: @password-input-dot-color;
border-radius: 100%; border-radius: 100%;
transform: translate(-50%, -50%);
visibility: hidden; visibility: hidden;
} }
} }
@ -61,7 +61,8 @@
height: @number-keyboard-cursor-height; height: @number-keyboard-cursor-height;
background-color: @number-keyboard-cursor-color; background-color: @number-keyboard-cursor-color;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
animation: @number-keyboard-cursor-animation-duration van-cursor-flicker infinite; animation: @number-keyboard-cursor-animation-duration van-cursor-flicker
infinite;
} }
} }

View File

@ -28,7 +28,7 @@
width: 1.25em; width: 1.25em;
height: 1.25em; height: 1.25em;
color: transparent; color: transparent;
font-size: .8em; font-size: 0.8em;
line-height: inherit; line-height: inherit;
text-align: center; text-align: center;
border: 1px solid @radio-border-color; border: 1px solid @radio-border-color;

View File

@ -22,7 +22,7 @@
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: .5em; width: 0.5em;
overflow: hidden; overflow: hidden;
} }
} }

View File

@ -4,7 +4,7 @@
&::after { &::after {
display: table; display: table;
clear: both; clear: both;
content: ""; content: '';
} }
&--flex { &--flex {

View File

@ -43,12 +43,13 @@
} }
&--animate { &--animate {
animation: van-skeleton-blink @skeleton-animation-duration ease-in-out infinite; animation: van-skeleton-blink @skeleton-animation-duration ease-in-out
infinite;
} }
} }
@keyframes van-skeleton-blink { @keyframes van-skeleton-blink {
50% { 50% {
opacity: .6; opacity: 0.6;
} }
} }

View File

@ -102,7 +102,7 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
background: currentColor; background: currentColor;
opacity: .1; opacity: 0.1;
content: ''; content: '';
} }
} }
@ -178,7 +178,7 @@
&::before { &::before {
background: currentColor; background: currentColor;
opacity: .1; opacity: 0.1;
} }
} }
@ -188,7 +188,7 @@
cursor: not-allowed; cursor: not-allowed;
.van-sku-row__item-img { .van-sku-row__item-img {
opacity: .3; opacity: 0.3;
} }
} }
} }
@ -282,7 +282,7 @@
z-index: 1; z-index: 1;
padding: 6px; padding: 6px;
color: @sku-upload-mask-color; color: @sku-upload-mask-color;
opacity: .8; opacity: 0.8;
&::before { &::before {
background-color: @white; background-color: @white;

View File

@ -95,8 +95,8 @@
} }
} }
input[type="number"]::-webkit-inner-spin-button, input[type='number']::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { input[type='number']::-webkit-outer-spin-button {
margin: 0; margin: 0;
-webkit-appearance: none; -webkit-appearance: none;
} }

View File

@ -1,4 +1,4 @@
@import "./var"; @import './var';
@keyframes van-slide-up-enter { @keyframes van-slide-up-enter {
from { from {

View File

@ -149,7 +149,7 @@ summary {
body { body {
color: @text-color; color: @text-color;
font-family: Arial, Helvetica, 'STHeiti STXihei', 'Microsoft YaHei', Tohoma, sans-serif; font-family: Arial, Helvetica, 'Microsoft YaHei', Tohoma, sans-serif;
background-color: @background-color; background-color: @background-color;
} }

View File

@ -23,8 +23,8 @@
// Component Colors // Component Colors
@text-color: @gray-8; @text-color: @gray-8;
@active-color: @gray-2; @active-color: @gray-2;
@active-opacity: .7; @active-opacity: 0.7;
@disabled-opacity: .5; @disabled-opacity: 0.5;
@background-color: @gray-1; @background-color: @gray-1;
@background-color-light: #fafafa; @background-color-light: #fafafa;
@ -42,11 +42,12 @@
@font-size-md: 14px; @font-size-md: 14px;
@font-size-lg: 16px; @font-size-lg: 16px;
@font-weight-bold: 500; @font-weight-bold: 500;
@price-integer-font-family: Avenir-Heavy, PingFang SC, Helvetica Neue, Arial, sans-serif; @price-integer-font-family: Avenir-Heavy, PingFang SC, Helvetica Neue, Arial,
sans-serif;
// Animation // Animation
@animation-duration-base: .3s; @animation-duration-base: 0.3s;
@animation-duration-fast: .2s; @animation-duration-fast: 0.2s;
// Border // Border
@border-color: @gray-3; @border-color: @gray-3;
@ -150,7 +151,7 @@
@calendar-range-edge-color: @white; @calendar-range-edge-color: @white;
@calendar-range-edge-background-color: @red; @calendar-range-edge-background-color: @red;
@calendar-range-middle-color: @red; @calendar-range-middle-color: @red;
@calendar-range-middle-background-opacity: .1; @calendar-range-middle-background-opacity: 0.1;
@calendar-selected-day-size: 54px; @calendar-selected-day-size: 54px;
@calendar-selected-day-color: @white; @calendar-selected-day-color: @white;
@calendar-info-font-size: @font-size-xs; @calendar-info-font-size: @font-size-xs;
@ -402,7 +403,7 @@
@image-preview-index-text-color: @white; @image-preview-index-text-color: @white;
@image-preview-index-font-size: @font-size-md; @image-preview-index-font-size: @font-size-md;
@image-preview-index-text-shadow: 0 1px 1px @gray-8; @image-preview-index-text-shadow: 0 1px 1px @gray-8;
@image-preview-overlay-background-color: rgba(0, 0, 0, .9); @image-preview-overlay-background-color: rgba(0, 0, 0, 0.9);
// List // List
@list-icon-margin-right: 5px; @list-icon-margin-right: 5px;
@ -415,7 +416,7 @@
@loading-text-font-size: @font-size-md; @loading-text-font-size: @font-size-md;
@loading-spinner-color: @gray-5; @loading-spinner-color: @gray-5;
@loading-spinner-size: 30px; @loading-spinner-size: 30px;
@loading-spinner-animation-duration: .8s; @loading-spinner-animation-duration: 0.8s;
// NavBar // NavBar
@nav-bar-height: 46px; @nav-bar-height: 46px;
@ -507,9 +508,9 @@
@picker-action-active-color: @active-color; @picker-action-active-color: @active-color;
@picker-option-font-size: @font-size-lg; @picker-option-font-size: @font-size-lg;
@picker-option-text-color: @black; @picker-option-text-color: @black;
@picker-option-disabled-opacity: .3; @picker-option-disabled-opacity: 0.3;
@picker-loading-icon-color: @blue; @picker-loading-icon-color: @blue;
@picker-loading-mask-color: rgba(255, 255, 255, .9); @picker-loading-mask-color: rgba(255, 255, 255, 0.9);
// Popup // Popup
@popup-background-color: @white; @popup-background-color: @white;
@ -552,7 +553,7 @@
// Search // Search
@search-padding: 10px @padding-sm; @search-padding: 10px @padding-sm;
@search-background-color: #f7f8fA; @search-background-color: @gray-1;
@search-input-height: 34px; @search-input-height: 34px;
@search-label-padding: 0 5px; @search-label-padding: 0 5px;
@search-label-color: @text-color; @search-label-color: @text-color;
@ -593,7 +594,7 @@
@slider-button-height: 24px; @slider-button-height: 24px;
@slider-button-border-radius: 50%; @slider-button-border-radius: 50%;
@slider-button-background-color: @white; @slider-button-background-color: @white;
@slider-button-box-shadow: 0 1px 2px rgba(0, 0, 0, .5); @slider-button-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
// Step // Step
@step-text-color: @gray-6; @step-text-color: @gray-6;
@ -652,7 +653,7 @@
@swipe-indicator-size: 6px; @swipe-indicator-size: 6px;
@swipe-indicator-margin: @padding-sm; @swipe-indicator-margin: @padding-sm;
@swipe-indicator-active-opacity: 1; @swipe-indicator-active-opacity: 1;
@swipe-indicator-inactive-opacity: .3; @swipe-indicator-inactive-opacity: 0.3;
@swipe-indicator-active-background-color: @blue; @swipe-indicator-active-background-color: @blue;
@swipe-indicator-inactive-background-color: @border-color; @swipe-indicator-inactive-background-color: @border-color;
@ -663,12 +664,13 @@
@switch-node-size: 1em; @switch-node-size: 1em;
@switch-node-z-index: 1; @switch-node-z-index: 1;
@switch-node-background-color: @white; @switch-node-background-color: @white;
@switch-node-box-shadow: 0 3px 1px 0 rgba(0, 0, 0, .05), 0 2px 2px 0 rgba(0, 0, 0, .1), 0 3px 3px 0 rgba(0, 0, 0, .05); @switch-node-box-shadow: 0 3px 1px 0 rgba(0, 0, 0, 0.05),
0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 3px 3px 0 rgba(0, 0, 0, 0.05);
@switch-background-color: @white; @switch-background-color: @white;
@switch-on-background-color: @blue; @switch-on-background-color: @blue;
@switch-transition-duration: @animation-duration-base; @switch-transition-duration: @animation-duration-base;
@switch-disabled-opacity: @disabled-opacity; @switch-disabled-opacity: @disabled-opacity;
@switch-border: @border-width-base solid rgba(0, 0, 0, .1); @switch-border: @border-width-base solid rgba(0, 0, 0, 0.1);
// SwitchCell // SwitchCell
@switch-cell-padding-top: @cell-vertical-padding - 1px; @switch-cell-padding-top: @cell-vertical-padding - 1px;
@ -703,12 +705,12 @@
@tabs-bottom-bar-color: @tabs-default-color; @tabs-bottom-bar-color: @tabs-default-color;
// Tag // Tag
@tag-padding: .2em .5em; @tag-padding: 0.2em 0.5em;
@tag-font-size: @font-size-xs; @tag-font-size: @font-size-xs;
@tag-medium-font-size: @font-size-sm; @tag-medium-font-size: @font-size-sm;
@tag-large-font-size: @font-size-md; @tag-large-font-size: @font-size-md;
@tag-text-color: @white; @tag-text-color: @white;
@tag-border-radius: .2em; @tag-border-radius: 0.2em;
@tag-round-border-radius: @border-radius-max; @tag-round-border-radius: @border-radius-max;
@tag-danger-color: @red; @tag-danger-color: @red;
@tag-primary-color: @blue; @tag-primary-color: @blue;
@ -767,4 +769,4 @@
// Sku // Sku
@sku-item-background-color: @background-color; @sku-item-background-color: @background-color;
@sku-icon-gray-color: #dcdde0; @sku-icon-gray-color: #dcdde0;
@sku-upload-mask-color: rgba(50, 50, 51, .8); @sku-upload-mask-color: rgba(50, 50, 51, 0.8);

View File

@ -36,7 +36,7 @@
background-color: @swipe-indicator-inactive-background-color; background-color: @swipe-indicator-inactive-background-color;
border-radius: 100%; border-radius: 100%;
opacity: @swipe-indicator-inactive-opacity; opacity: @swipe-indicator-inactive-opacity;
transition: opacity .2s; transition: opacity 0.2s;
&:not(:last-child) { &:not(:last-child) {
margin-right: @swipe-indicator-size; margin-right: @swipe-indicator-size;

View File

@ -23,7 +23,8 @@
background-color: @switch-node-background-color; background-color: @switch-node-background-color;
border-radius: 100%; border-radius: 100%;
box-shadow: @switch-node-box-shadow; box-shadow: @switch-node-box-shadow;
transition: transform @switch-transition-duration cubic-bezier(.3, 1.05, .4, 1.05); transition: transform @switch-transition-duration
cubic-bezier(0.3, 1.05, 0.4, 1.05);
} }
&__loading { &__loading {

View File

@ -59,7 +59,7 @@
} }
&--mark { &--mark {
padding-right: .7em; padding-right: 0.7em;
&, &,
&::after { &::after {