mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 10:44:59 +00:00
[Improvement] Icon add 'info' prop (#447)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
@import './common/var.css';
|
||||
|
||||
@font-face {
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
@@ -6,11 +8,29 @@
|
||||
}
|
||||
|
||||
.van-icon {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
font: normal normal normal 14px/1 "vant-icon";
|
||||
font-size: inherit;
|
||||
text-rendering: auto;
|
||||
|
||||
&__info {
|
||||
color: #fff;
|
||||
left: 50%;
|
||||
top: -.5em;
|
||||
font-size: .5em;
|
||||
margin-left: .8em;
|
||||
padding: 0 .3em;
|
||||
text-align: center;
|
||||
min-width: 1.2em;
|
||||
line-height: 1.2;
|
||||
position: absolute;
|
||||
border-radius: .6em;
|
||||
box-sizing: border-box;
|
||||
background-color: $red;
|
||||
font-family: PingFang SC, Helvetica Neue, Arial, sans-serif;
|
||||
}
|
||||
|
||||
&:before {
|
||||
display: inline-block;
|
||||
}
|
||||
|
@@ -49,22 +49,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
&__info {
|
||||
color: #fff;
|
||||
top: -5px;
|
||||
right: -100%;
|
||||
font-size: 12px;
|
||||
transform: scale(.8);
|
||||
box-sizing: border-box;
|
||||
padding: 0 3px;
|
||||
text-align: center;
|
||||
min-width: 18px;
|
||||
line-height: 18px;
|
||||
border-radius: 9px;
|
||||
background-color: $red;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
&--active {
|
||||
color: $blue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user