[Improvement] stylelint (#1280)

This commit is contained in:
neverland
2018-06-13 20:36:36 +08:00
committed by GitHub
parent 90bbfd2b12
commit 00351a564f
33 changed files with 905 additions and 174 deletions

View File

@@ -67,4 +67,4 @@
line-height: 1.2;
}
}
}
}

View File

@@ -23,15 +23,15 @@
border: inherit;
border-color: $black;
background-color: $black;
border-radius: inherit;/* inherit parent's border radius */
transform: translate(-50%, -50%);
border-radius: inherit; /* inherit parent's border radius */
transform: translate(-50%, -50%);
}
&:active::before {
opacity: .3;
}
&--unclickable:before {
&--unclickable::before {
display: none;
}

View File

@@ -57,6 +57,7 @@
&__title {
max-height: 40px;
@mixin multi-ellipsis 2;
}
@@ -64,6 +65,7 @@
color: $gray-darker;
font-size: 12px;
max-height: 20px;
@mixin ellipsis;
}

View File

@@ -44,7 +44,7 @@
text-align: left;
}
}
&__left-icon {
font-size: 16px;
line-height: 24px;

View File

@@ -14,6 +14,7 @@
from {
opacity: 0;
}
to {
opacity: 1;
}
@@ -23,6 +24,7 @@
from {
opacity: 1;
}
to {
opacity: 0;
}
@@ -32,6 +34,7 @@
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}

View File

@@ -58,4 +58,4 @@
line-height: 1.2;
}
}
}
}

View File

@@ -137,7 +137,6 @@
flex: 1;
color: $white;
display: flex;
margin-left: -1px; /* hack for flex space */
text-align: center;
margin-left: -16px;
flex-direction: column;
@@ -158,6 +157,7 @@
margin: 0;
font-size: 14px;
font-weight: 300;
@mixin ellipsis;
}
}
@@ -192,6 +192,7 @@
h2,
span {
line-height: 1.4;
@mixin ellipsis;
}
}
@@ -213,7 +214,7 @@
right: -13px;
color: $white;
font-size: 12px;
&::before {
font-weight: bold;
}

View File

@@ -51,7 +51,7 @@
&__confirm {
&,
&:active {
color: #00C000;
color: #00c000;
}
}

View File

@@ -11,7 +11,7 @@
flex: 1;
padding: 0;
@media(max-width: 321px) {
@media (max-width: 321px) {
font-size: 15px;
}
}
@@ -22,7 +22,7 @@
height: 50px;
font-size: 10px;
min-width: 15%;
line-height: 1;
line-height: 1;
text-align: center;
background-color: $white;
flex-direction: column;

View File

@@ -3,4 +3,4 @@
font-weight: normal;
font-family: 'vant-icon';
src: url('../icon/vant-icon-9b71af.ttf') format('truetype');
}
}

View File

@@ -31,293 +31,388 @@
font-family: PingFang SC, Helvetica Neue, Arial, sans-serif;
}
&:before {
&::before {
display: inline-block;
}
}
.van-icon-add-o:before {
.van-icon-add-o::before {
content: "\F000";
}
.van-icon-add:before {
.van-icon-add::before {
content: "\F001";
}
.van-icon-add2:before {
.van-icon-add2::before {
content: "\F002";
}
.van-icon-after-sale:before {
.van-icon-after-sale::before {
content: "\F003";
}
.van-icon-alipay:before {
.van-icon-alipay::before {
content: "\F004";
}
.van-icon-arrow-left:before {
.van-icon-arrow-left::before {
content: "\F005";
}
.van-icon-arrow:before {
.van-icon-arrow::before {
content: "\F006";
}
.van-icon-balance-details:before {
.van-icon-balance-details::before {
content: "\F007";
}
.van-icon-balance-pay:before {
.van-icon-balance-pay::before {
content: "\F008";
}
.van-icon-birthday-privilege:before {
.van-icon-birthday-privilege::before {
content: "\F009";
}
.van-icon-browsing-history:before {
.van-icon-browsing-history::before {
content: "\F00A";
}
.van-icon-card:before {
.van-icon-card::before {
content: "\F00B";
}
.van-icon-cart:before {
.van-icon-cart::before {
content: "\F00C";
}
.van-icon-cash-back-record:before {
.van-icon-cash-back-record::before {
content: "\F00D";
}
.van-icon-cash-on-deliver:before {
.van-icon-cash-on-deliver::before {
content: "\F00E";
}
.van-icon-certificate:before {
.van-icon-certificate::before {
content: "\F00F";
}
.van-icon-chat:before {
.van-icon-chat::before {
content: "\F010";
}
.van-icon-check:before {
.van-icon-check::before {
content: "\F011";
}
.van-icon-checked:before {
.van-icon-checked::before {
content: "\F012";
}
.van-icon-clear:before {
.van-icon-clear::before {
content: "\F013";
}
.van-icon-clock:before {
.van-icon-clock::before {
content: "\F014";
}
.van-icon-close:before {
.van-icon-close::before {
content: "\F015";
}
.van-icon-completed:before {
.van-icon-completed::before {
content: "\F016";
}
.van-icon-contact:before {
.van-icon-contact::before {
content: "\F017";
}
.van-icon-coupon:before {
.van-icon-coupon::before {
content: "\F018";
}
.van-icon-credit-pay:before {
.van-icon-credit-pay::before {
content: "\F019";
}
.van-icon-debit-pay:before {
.van-icon-debit-pay::before {
content: "\F01A";
}
.van-icon-delete:before {
.van-icon-delete::before {
content: "\F01B";
}
.van-icon-description:before {
.van-icon-description::before {
content: "\F01C";
}
.van-icon-discount:before {
.van-icon-discount::before {
content: "\F01D";
}
.van-icon-ecard-pay:before {
.van-icon-ecard-pay::before {
content: "\F01E";
}
.van-icon-edit-data:before {
.van-icon-edit-data::before {
content: "\F01F";
}
.van-icon-edit:before {
.van-icon-edit::before {
content: "\F020";
}
.van-icon-exchange-record:before {
.van-icon-exchange-record::before {
content: "\F021";
}
.van-icon-exchange:before {
.van-icon-exchange::before {
content: "\F022";
}
.van-icon-fail:before {
.van-icon-fail::before {
content: "\F023";
}
.van-icon-free-postage:before {
.van-icon-free-postage::before {
content: "\F024";
}
.van-icon-gift-card-pay:before {
.van-icon-gift-card-pay::before {
content: "\F025";
}
.van-icon-gift-card:before {
.van-icon-gift-card::before {
content: "\F026";
}
.van-icon-gift:before {
.van-icon-gift::before {
content: "\F027";
}
.van-icon-gold-coin:before {
.van-icon-gold-coin::before {
content: "\F028";
}
.van-icon-goods-collect:before {
.van-icon-goods-collect::before {
content: "\F029";
}
.van-icon-home:before {
.van-icon-home::before {
content: "\F02A";
}
.van-icon-hot-sale:before {
.van-icon-hot-sale::before {
content: "\F02B";
}
.van-icon-hot:before {
.van-icon-hot::before {
content: "\F02C";
}
.van-icon-info-o:before {
.van-icon-info-o::before {
content: "\F02D";
}
.van-icon-like-o:before {
.van-icon-like-o::before {
content: "\F02E";
}
.van-icon-like:before {
.van-icon-like::before {
content: "\F02F";
}
.van-icon-location:before {
.van-icon-location::before {
content: "\F030";
}
.van-icon-logistics:before {
.van-icon-logistics::before {
content: "\F031";
}
.van-icon-member-day-privilege:before {
.van-icon-member-day-privilege::before {
content: "\F032";
}
.van-icon-more-o:before {
.van-icon-more-o::before {
content: "\F033";
}
.van-icon-more:before {
.van-icon-more::before {
content: "\F034";
}
.van-icon-new-arrival:before {
.van-icon-new-arrival::before {
content: "\F035";
}
.van-icon-new:before {
.van-icon-new::before {
content: "\F036";
}
.van-icon-other-pay:before {
.van-icon-other-pay::before {
content: "\F037";
}
.van-icon-passed:before {
.van-icon-passed::before {
content: "\F038";
}
.van-icon-password-not-view:before {
.van-icon-password-not-view::before {
content: "\F039";
}
.van-icon-password-view:before {
.van-icon-password-view::before {
content: "\F03A";
}
.van-icon-pause:before {
.van-icon-pause::before {
content: "\F03B";
}
.van-icon-peer-pay:before {
.van-icon-peer-pay::before {
content: "\F03C";
}
.van-icon-pending-deliver:before {
.van-icon-pending-deliver::before {
content: "\F03D";
}
.van-icon-pending-evaluate:before {
.van-icon-pending-evaluate::before {
content: "\F03E";
}
.van-icon-pending-orders:before {
.van-icon-pending-orders::before {
content: "\F03F";
}
.van-icon-pending-payment:before {
.van-icon-pending-payment::before {
content: "\F040";
}
.van-icon-phone:before {
.van-icon-phone::before {
content: "\F041";
}
.van-icon-photo:before {
.van-icon-photo::before {
content: "\F042";
}
.van-icon-photograph:before {
.van-icon-photograph::before {
content: "\F043";
}
.van-icon-play:before {
.van-icon-play::before {
content: "\F044";
}
.van-icon-point-gift:before {
.van-icon-point-gift::before {
content: "\F045";
}
.van-icon-points-mall:before {
.van-icon-points-mall::before {
content: "\F046";
}
.van-icon-points:before {
.van-icon-points::before {
content: "\F047";
}
.van-icon-qr-invalid:before {
.van-icon-qr-invalid::before {
content: "\F048";
}
.van-icon-qr:before {
.van-icon-qr::before {
content: "\F049";
}
.van-icon-question:before {
.van-icon-question::before {
content: "\F04A";
}
.van-icon-receive-gift:before {
.van-icon-receive-gift::before {
content: "\F04B";
}
.van-icon-records:before {
.van-icon-records::before {
content: "\F04C";
}
.van-icon-search:before {
.van-icon-search::before {
content: "\F04D";
}
.van-icon-send-gift:before {
.van-icon-send-gift::before {
content: "\F04E";
}
.van-icon-setting:before {
.van-icon-setting::before {
content: "\F04F";
}
.van-icon-share:before {
.van-icon-share::before {
content: "\F050";
}
.van-icon-shop-collect:before {
.van-icon-shop-collect::before {
content: "\F051";
}
.van-icon-shop:before {
.van-icon-shop::before {
content: "\F052";
}
.van-icon-shopping-cart:before {
.van-icon-shopping-cart::before {
content: "\F053";
}
.van-icon-sign:before {
.van-icon-sign::before {
content: "\F054";
}
.van-icon-stop:before {
.van-icon-stop::before {
content: "\F055";
}
.van-icon-success:before {
.van-icon-success::before {
content: "\F056";
}
.van-icon-tosend:before {
.van-icon-tosend::before {
content: "\F057";
}
.van-icon-underway:before {
.van-icon-underway::before {
content: "\F058";
}
.van-icon-upgrade:before {
.van-icon-upgrade::before {
content: "\F059";
}
.van-icon-value-card:before {
.van-icon-value-card::before {
content: "\F05A";
}
.van-icon-wap-home:before {
.van-icon-wap-home::before {
content: "\F05B";
}
.van-icon-wap-nav:before {
.van-icon-wap-nav::before {
content: "\F05C";
}
.van-icon-warn:before {
.van-icon-warn::before {
content: "\F05D";
}
.van-icon-wechat:before {
.van-icon-wechat::before {
content: "\F05E";
}

View File

@@ -114,10 +114,12 @@
stroke-dasharray: 1, 200;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -40;
}
100% {
stroke-dasharray: 90, 150;
stroke-dashoffset: -120;

View File

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

View File

@@ -52,7 +52,7 @@ $van-number-keyboard-key-height: 54px;
}
.van-key {
width: calc(100%/3);
width: calc(100% / 3);
font-size: 24px;
font-style: normal;
text-align: center;
@@ -66,7 +66,7 @@ $van-number-keyboard-key-height: 54px;
}
&--middle {
width: calc(200%/3);
width: calc(200% / 3);
}
&--big {
@@ -96,7 +96,7 @@ $van-number-keyboard-key-height: 54px;
}
&--gray {
background-color: #F3F3F6;
background-color: #f3f3f6;
}
&--active {

View File

@@ -41,7 +41,7 @@
bottom: 0;
z-index: 2;
position: absolute;
background-color: rgba(255,255,255,.9);
background-color: rgba(255, 255, 255, .9);
circle {
stroke: $blue;

View File

@@ -76,6 +76,7 @@
transform: translate3d(-50%, 100%, 0);
}
.popup-slide-left-enter, .popup-slide-left-leave-active {
.popup-slide-left-enter,
.popup-slide-left-leave-active {
transform: translate3d(-100%, -50%, 0);
}

View File

@@ -38,4 +38,4 @@
&__text {
display: block;
}
}
}

View File

@@ -1,48 +1,146 @@
@import './common/var.css';
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font: inherit;
font-size: 100%;
vertical-align: baseline
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
margin: 0;
padding: 0;
border: 0;
font: inherit;
font-size: 100%;
vertical-align: baseline;
}
html {
line-height: 1;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
line-height: 1;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
ol, ul {
list-style: none
ol,
ul {
list-style: none;
}
table {
border-collapse: collapse;
border-spacing: 0
border-collapse: collapse;
border-spacing: 0;
}
caption, th, td {
font-weight: normal;
vertical-align: middle
caption,
th,
td {
font-weight: normal;
vertical-align: middle;
}
q, blockquote {
quotes: none
q,
blockquote {
quotes: none;
}
q:before, q:after, blockquote:before, blockquote:after {
content: "";
content: none
q::before,
q::after,
blockquote::before,
blockquote::after {
content: '';
content: none;
}
a img {
border: none
border: none;
}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
display: block
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section,
summary {
display: block;
}
* {
@@ -50,8 +148,8 @@ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav,
}
body {
font-family: Arial, Helvetica, "STHeiti STXihei", "Microsoft YaHei", Tohoma, sans-serif;
color: $text-color;
font-family: Arial, Helvetica, 'STHeiti STXihei', 'Microsoft YaHei', Tohoma, sans-serif;
color: $text-color;
background-color: $background-color;
}
@@ -61,7 +159,11 @@ a {
}
button,
input[type='number'],input[type='text'],input[type='password'],input[type='email'],input[type='search'],
input[type='number'],
input[type='text'],
input[type='password'],
input[type='email'],
input[type='search'],
select,
textarea {
font-family: inherit;

View File

@@ -1,7 +1,7 @@
@import './common/var.css';
.van-row {
&:after {
&::after {
content: "";
display: table;
clear: both;

View File

@@ -52,6 +52,6 @@
}
.van-icon-clear {
color: #BBB;
color: #bbb;
}
}

View File

@@ -166,6 +166,7 @@
.van-cell__title {
max-width: 90px;
}
.van-cell__value {
text-align: left;
}

View File

@@ -56,7 +56,7 @@
font-size: 14px;
position: relative;
color: $gray-dark;
&--horizontal {
float: left;
@@ -105,7 +105,7 @@
.van-step__line {
position: absolute;
left: 0px;
left: 0;
top: 30px;
width: 100%;
height: 1px;

View File

@@ -10,9 +10,9 @@
&__tip {
color: $orange;
padding: 10px;
font-size: 12px;
line-height: 18px;
padding: 10px 10px;
background-color: #fff7cc;
}

View File

@@ -4,4 +4,4 @@
.van-switch {
float: right;
}
}
}

View File

@@ -6,7 +6,6 @@
display: inline-block;
position: relative;
background: $white;
border-radius: 16px;
box-sizing: content-box;
border: 1px solid rgba(0, 0, 0, .1);
border-radius: 1em;

View File

@@ -4,7 +4,7 @@
position: fixed;
top: 50%;
left: 50%;
display: flex;
display: flex;
color: $white;
font-size: 12px;
line-height: 1.2;

View File

@@ -31,13 +31,13 @@
overflow: scroll;
-webkit-overflow-scrolling: touch;
}
&__item {
position: relative;
line-height: 44px;
padding-left: 5px;
padding-right: 18px;
&--active {
color: $button-danger-background-color;
}