[improvement] Tag: add less vars (#3087)

This commit is contained in:
neverland 2019-04-03 20:36:50 +08:00 committed by GitHub
parent 5f49cfc85f
commit 861357c015
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 9 deletions

View File

@ -148,6 +148,15 @@
@tabs-line-height: 44px;
@tabs-card-height: 30px;
// Tag
@tag-padding: .2em .5em;
@tag-font-size: 10px;
@tag-medium-font-size: 12px;
@tag-large-font-size: 14px;
@tag-text-color: @white;
@tag-border-radius: .2em;
@tag-round-border-radius: .8em;
// Toast
@toast-max-width: 70%;
@toast-font-size: 14px;

View File

@ -139,6 +139,8 @@ export default {
<style lang="less">
.demo-tag {
background-color: #fff;
.van-tag + .van-tag {
margin-left: 10px;
}

View File

@ -1,16 +1,16 @@
@import '../style/var';
.van-tag {
color: @white;
font-size: 10px;
padding: .2em .5em;
color: @tag-text-color;
font-size: @tag-font-size;
padding: @tag-padding;
line-height: normal;
border-radius: .2em;
border-radius: @tag-border-radius;
display: inline-block;
&::after {
border-color: currentColor;
border-radius: .4em;
border-radius: @tag-border-radius * 2;
}
&--mark {
@ -23,18 +23,18 @@
}
&--round {
border-radius: .8em;
border-radius: @tag-round-border-radius;
&::after {
border-radius: 1.6em;
border-radius: @tag-round-border-radius * 2;
}
}
&--medium {
font-size: 12px;
font-size: @tag-medium-font-size;
}
&--large {
font-size: 14px;
font-size: @tag-large-font-size;
}
}